update add, data, geo to use gapp.register()
This commit is contained in:
parent
19522665b2
commit
32e9ceca55
23 changed files with 504 additions and 489 deletions
|
|
@ -3,12 +3,10 @@
|
|||
"use strict";
|
||||
|
||||
// dep: geo.base
|
||||
(function() {
|
||||
gapp.register("geo.bounds", [], (root, exports) => {
|
||||
|
||||
let base = self.base;
|
||||
if (base.Bounds) return;
|
||||
|
||||
let { config, util } = base;
|
||||
const { base } = root;
|
||||
const { config, util } = base;
|
||||
|
||||
class Bounds {
|
||||
constructor() {
|
||||
|
|
@ -132,9 +130,12 @@ class Bounds {
|
|||
|
||||
centery() {
|
||||
return this.miny + this.height() / 2;
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
base.Bounds = Bounds;
|
||||
base.newBounds = function() { return new Bounds() };
|
||||
gapp.overlay(base, {
|
||||
Bounds,
|
||||
newBounds() { return new Bounds() }
|
||||
});
|
||||
|
||||
})();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue