Skip to content

Commit

Permalink
Fixed dart-1.0 breaking changes. Replaced deprecated calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
hyamamoto committed Feb 12, 2014
1 parent 8a19e38 commit d39b221
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dart/lib/dock_spawn.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion dart/lib/serialization/dock_graph_deserializer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class DockGraphDeserializer {
DockGraphDeserializer(this.dockManager);

DockModel deserialize(String _json) {
Map<String, Object> graphInfo = json.parse(_json);
Map<String, Object> graphInfo = JSON.decode(_json);
DockModel model = new DockModel();
model.rootNode = _buildGraph(graphInfo);
return model;
Expand Down
2 changes: 1 addition & 1 deletion dart/lib/serialization/dock_graph_serializer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class DockGraphSerializer {

String serialize(DockModel model) {
var graphInfo = _buildGraphInfo(model.rootNode);
return json.stringify(graphInfo);
return JSON.encode(graphInfo);
}

Map<String, Object> _buildGraphInfo(DockNode node) {
Expand Down
7 changes: 7 additions & 0 deletions dart/lib/utils/geometric_primitives.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: dock_spawn
version: 1.0.1
version: 1.0.3
author: Ali Akbar Vathi <[email protected]>
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'

0 comments on commit d39b221

Please sign in to comment.