Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Unified Diff: lib/runtime/dart/math.js

Issue 1131143002: Angular workarounds (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase onto latest Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/runtime/dart/core.js ('k') | lib/runtime/dart_runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/math.js
diff --git a/lib/runtime/dart/math.js b/lib/runtime/dart/math.js
index c0969b6c7aef7dfbd12bb5777e3e0cfcebfa2cf4..57207d80ece5d80cd3d721b9cf340273586b2650 100644
--- a/lib/runtime/dart/math.js
+++ b/lib/runtime/dart/math.js
@@ -124,7 +124,7 @@ var _js_helper = dart.lazyImport(_js_helper);
return dart.notNull(this.left['<='](another.left)) && dart.notNull(this.left['+'](this.width)) >= dart.notNull(another.left) + dart.notNull(another.width) && dart.notNull(this.top['<='](another.top)) && dart.notNull(this.top['+'](this.height)) >= dart.notNull(another.top) + dart.notNull(another.height);
}
containsPoint(another) {
- return core.num['>='](another.x, this.left) && dart.notNull(another.x) <= dart.notNull(this.left['+'](this.width)) && core.num['>='](another.y, this.top) && dart.notNull(another.y) <= dart.notNull(this.top['+'](this.height));
+ return another.x['>='](this.left) && dart.notNull(another.x) <= dart.notNull(this.left['+'](this.width)) && another.y['>='](this.top) && dart.notNull(another.y) <= dart.notNull(this.top['+'](this.height));
}
get topLeft() {
return new (Point$(T))(this.left, this.top);
@@ -153,9 +153,9 @@ var _js_helper = dart.lazyImport(_js_helper);
}
fromPoints(a, b) {
let left = dart.as(min(a.x, b.x), T);
- let width = dart.as(core.num['-'](max(a.x, b.x), left), T);
+ let width = dart.as(max(a.x, b.x)['-'](left), T);
let top = dart.as(min(a.y, b.y), T);
- let height = dart.as(core.num['-'](max(a.y, b.y), top), T);
+ let height = dart.as(max(a.y, b.y)['-'](top), T);
return new (Rectangle$(T))(left, top, width, height);
}
}
@@ -176,9 +176,9 @@ var _js_helper = dart.lazyImport(_js_helper);
}
fromPoints(a, b) {
let left = dart.as(min(a.x, b.x), T);
- let width = dart.as(core.num['-'](max(a.x, b.x), left), T);
+ let width = dart.as(max(a.x, b.x)['-'](left), T);
let top = dart.as(min(a.y, b.y), T);
- let height = dart.as(core.num['-'](max(a.y, b.y), top), T);
+ let height = dart.as(max(a.y, b.y)['-'](top), T);
return new (MutableRectangle$(T))(left, top, width, height);
}
get width() {
« no previous file with comments | « lib/runtime/dart/core.js ('k') | lib/runtime/dart_runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698