update add, data, geo to use gapp.register()

This commit is contained in:
Stewart Allen 2022-02-20 14:31:27 -05:00
commit 32e9ceca55
23 changed files with 504 additions and 489 deletions

View file

@ -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() }
});
})();
});