diff --git a/dart/lib/dock_spawn.dart b/dart/lib/dock_spawn.dart index 0a51385..f85ddf1 100644 --- a/dart/lib/dock_spawn.dart +++ b/dart/lib/dock_spawn.dart @@ -3,7 +3,7 @@ library dock_spawn; import 'dart:html'; import 'dart:async'; import 'dart:math'; -import 'dart:json' as json; +import 'dart:convert' as JSON; part 'dialog/dialog.dart'; part 'decorators/draggable_container.dart'; diff --git a/dart/lib/serialization/dock_graph_deserializer.dart b/dart/lib/serialization/dock_graph_deserializer.dart index 0840de0..9d98974 100644 --- a/dart/lib/serialization/dock_graph_deserializer.dart +++ b/dart/lib/serialization/dock_graph_deserializer.dart @@ -8,7 +8,7 @@ class DockGraphDeserializer { DockGraphDeserializer(this.dockManager); DockModel deserialize(String _json) { - Map graphInfo = json.parse(_json); + Map graphInfo = JSON.decode(_json); DockModel model = new DockModel(); model.rootNode = _buildGraph(graphInfo); return model; diff --git a/dart/lib/serialization/dock_graph_serializer.dart b/dart/lib/serialization/dock_graph_serializer.dart index 1a1ec09..bcdead1 100644 --- a/dart/lib/serialization/dock_graph_serializer.dart +++ b/dart/lib/serialization/dock_graph_serializer.dart @@ -7,7 +7,7 @@ class DockGraphSerializer { String serialize(DockModel model) { var graphInfo = _buildGraphInfo(model.rootNode); - return json.stringify(graphInfo); + return JSON.encode(graphInfo); } Map _buildGraphInfo(DockNode node) { diff --git a/dart/lib/utils/geometric_primitives.dart b/dart/lib/utils/geometric_primitives.dart index 0038aa0..4d10e65 100644 --- a/dart/lib/utils/geometric_primitives.dart +++ b/dart/lib/utils/geometric_primitives.dart @@ -70,6 +70,13 @@ class Point2 { } String toString() => "[$x, $y]"; + + int get hashCode { + int result = 17; + result = 37 * result + x.hashCode; + result = 37 * result + y.hashCode; + return result; + } } class Size { diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index 0cb6d5f..2c8e7ba 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -1,7 +1,7 @@ name: dock_spawn -version: 1.0.1 +version: 1.0.3 author: Ali Akbar Vathi description: Dock Spawn is a powerful web based dock layout engine. Create dockable panel windows similar to Visual Studio IDE homepage: http://www.dockspawn.com/ dependencies: - browser: '>=0.3.5+1 <0.3.6' + browser: '>= 0.9.1'