Skip to content

Commit 55b3f4b

Browse files
committed
Merge pull request #12 from hyamamoto/dart-1.1
Update for dart-1.1 breaking changes
2 parents 8a19e38 + d39b221 commit 55b3f4b

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

dart/lib/dock_spawn.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ library dock_spawn;
33
import 'dart:html';
44
import 'dart:async';
55
import 'dart:math';
6-
import 'dart:json' as json;
6+
import 'dart:convert' as JSON;
77

88
part 'dialog/dialog.dart';
99
part 'decorators/draggable_container.dart';

dart/lib/serialization/dock_graph_deserializer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class DockGraphDeserializer {
88
DockGraphDeserializer(this.dockManager);
99

1010
DockModel deserialize(String _json) {
11-
Map<String, Object> graphInfo = json.parse(_json);
11+
Map<String, Object> graphInfo = JSON.decode(_json);
1212
DockModel model = new DockModel();
1313
model.rootNode = _buildGraph(graphInfo);
1414
return model;

dart/lib/serialization/dock_graph_serializer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class DockGraphSerializer {
77

88
String serialize(DockModel model) {
99
var graphInfo = _buildGraphInfo(model.rootNode);
10-
return json.stringify(graphInfo);
10+
return JSON.encode(graphInfo);
1111
}
1212

1313
Map<String, Object> _buildGraphInfo(DockNode node) {

dart/lib/utils/geometric_primitives.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ class Point2 {
7070
}
7171

7272
String toString() => "[$x, $y]";
73+
74+
int get hashCode {
75+
int result = 17;
76+
result = 37 * result + x.hashCode;
77+
result = 37 * result + y.hashCode;
78+
return result;
79+
}
7380
}
7481

7582
class Size {

dart/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: dock_spawn
2-
version: 1.0.1
2+
version: 1.0.3
33
author: Ali Akbar Vathi <[email protected]>
44
description: Dock Spawn is a powerful web based dock layout engine. Create dockable panel windows similar to Visual Studio IDE
55
homepage: http://www.dockspawn.com/
66
dependencies:
7-
browser: '>=0.3.5+1 <0.3.6'
7+
browser: '>= 0.9.1'

0 commit comments

Comments
 (0)