@leafer-in/view 1.0.0-rc.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/view.esm.js +90 -0
- package/dist/view.esm.min.js +1 -0
- package/dist/view.js +93 -0
- package/dist/view.min.js +1 -0
- package/package.json +37 -0
- package/src/helper.ts +23 -0
- package/src/index.ts +86 -0
- package/types/index.d.ts +2 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present, Chao (Leafer) Wan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @leafer-in/view
|
package/dist/view.esm.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Leafer, Bounds, LeafBoundsHelper } from '@leafer-ui/draw';
|
|
2
|
+
|
|
3
|
+
function getZoomScale(scaleX, type) {
|
|
4
|
+
let scale = 1;
|
|
5
|
+
const out = type === 'out', absScale = Math.abs(scaleX);
|
|
6
|
+
if (absScale > 1) {
|
|
7
|
+
while (out ? scale < absScale : scale <= absScale)
|
|
8
|
+
scale *= 2;
|
|
9
|
+
if (out)
|
|
10
|
+
scale /= 2;
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
while (out ? scale >= absScale : scale > absScale)
|
|
14
|
+
scale /= 2;
|
|
15
|
+
if (!out)
|
|
16
|
+
scale *= 2;
|
|
17
|
+
}
|
|
18
|
+
return scale / scaleX;
|
|
19
|
+
}
|
|
20
|
+
function getFixBounds(bounds, scaleBounds) {
|
|
21
|
+
let { x, y, width, height } = bounds;
|
|
22
|
+
let fix;
|
|
23
|
+
if (!height)
|
|
24
|
+
height = width * (scaleBounds.height / scaleBounds.width), fix = true;
|
|
25
|
+
if (!width)
|
|
26
|
+
width = height * (scaleBounds.width / scaleBounds.height), fix = true;
|
|
27
|
+
return fix ? { x, y, width, height } : bounds;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
Leafer.prototype.zoom = function (zoomType, padding, fixed) {
|
|
31
|
+
const { zoomLayer } = this;
|
|
32
|
+
const limitBounds = this.canvas.bounds.clone().shrink(padding ? padding : 30), bounds = new Bounds();
|
|
33
|
+
const center = { x: limitBounds.x + limitBounds.width / 2, y: limitBounds.y + limitBounds.height / 2 };
|
|
34
|
+
let scale;
|
|
35
|
+
if (typeof zoomType === 'string') {
|
|
36
|
+
const { scaleX } = this.__;
|
|
37
|
+
switch (zoomType) {
|
|
38
|
+
case 'in':
|
|
39
|
+
scale = getZoomScale(scaleX, 'in');
|
|
40
|
+
break;
|
|
41
|
+
case 'out':
|
|
42
|
+
scale = getZoomScale(scaleX, 'out');
|
|
43
|
+
break;
|
|
44
|
+
case 'fit':
|
|
45
|
+
zoomType = this.boxBounds;
|
|
46
|
+
break;
|
|
47
|
+
case 'fit-width':
|
|
48
|
+
zoomType = new Bounds(this.boxBounds);
|
|
49
|
+
zoomType.height = 0;
|
|
50
|
+
break;
|
|
51
|
+
case 'fit-height':
|
|
52
|
+
zoomType = new Bounds(this.boxBounds);
|
|
53
|
+
zoomType.width = 0;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else if (typeof zoomType === 'number') {
|
|
58
|
+
scale = zoomType;
|
|
59
|
+
}
|
|
60
|
+
if (scale) {
|
|
61
|
+
zoomLayer.scaleOfWorld(center, this.validScale(scale));
|
|
62
|
+
}
|
|
63
|
+
else if (typeof zoomType === 'object') {
|
|
64
|
+
const isArray = zoomType instanceof Array;
|
|
65
|
+
if (isArray || zoomType.tag) {
|
|
66
|
+
const list = isArray ? zoomType : [zoomType];
|
|
67
|
+
bounds.setListWithFn(list, LeafBoundsHelper.worldBounds);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
const innerBounds = getFixBounds(zoomType, limitBounds);
|
|
71
|
+
bounds.set(zoomLayer.getWorldBounds(innerBounds));
|
|
72
|
+
}
|
|
73
|
+
const { x, y, width, height } = bounds;
|
|
74
|
+
let moveX = limitBounds.x - x, moveY = limitBounds.y - y;
|
|
75
|
+
if (fixed) {
|
|
76
|
+
moveX += Math.max((limitBounds.width - width) / 2, 0);
|
|
77
|
+
moveY += Math.max((limitBounds.height - height) / 2, 0);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
const fitScale = this.validScale(Math.min(limitBounds.width / width, limitBounds.height / height));
|
|
81
|
+
moveX += (limitBounds.width - width * fitScale) / 2;
|
|
82
|
+
moveY += (limitBounds.height - height * fitScale) / 2;
|
|
83
|
+
zoomLayer.scaleOfWorld(bounds, fitScale);
|
|
84
|
+
bounds.scaleOf(bounds, fitScale);
|
|
85
|
+
}
|
|
86
|
+
zoomLayer.move(moveX, moveY);
|
|
87
|
+
return bounds.move(moveX, moveY);
|
|
88
|
+
}
|
|
89
|
+
return zoomLayer.worldBoxBounds;
|
|
90
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Leafer as t,Bounds as e,LeafBoundsHelper as i}from"@leafer-ui/draw";function h(t,e){let i=1;const h="out"===e,o=Math.abs(t);if(o>1){for(;h?i<o:i<=o;)i*=2;h&&(i/=2)}else{for(;h?i>=o:i>o;)i/=2;h||(i*=2)}return i/t}t.prototype.zoom=function(t,o,s){const{zoomLayer:n}=this,a=this.canvas.bounds.clone().shrink(o||30),r=new e,c={x:a.x+a.width/2,y:a.y+a.height/2};let d;if("string"==typeof t){const{scaleX:i}=this.__;switch(t){case"in":d=h(i,"in");break;case"out":d=h(i,"out");break;case"fit":t=this.boxBounds;break;case"fit-width":(t=new e(this.boxBounds)).height=0;break;case"fit-height":(t=new e(this.boxBounds)).width=0}}else"number"==typeof t&&(d=t);if(d)n.scaleOfWorld(c,this.validScale(d));else if("object"==typeof t){const e=t instanceof Array;if(e||t.tag){const h=e?t:[t];r.setListWithFn(h,i.worldBounds)}else{const e=function(t,e){let i,{x:h,y:o,width:s,height:n}=t;return n||(n=s*(e.height/e.width),i=!0),s||(s=n*(e.width/e.height),i=!0),i?{x:h,y:o,width:s,height:n}:t}(t,a);r.set(n.getWorldBounds(e))}const{x:h,y:o,width:c,height:d}=r;let l=a.x-h,f=a.y-o;if(s)l+=Math.max((a.width-c)/2,0),f+=Math.max((a.height-d)/2,0);else{const t=this.validScale(Math.min(a.width/c,a.height/d));l+=(a.width-c*t)/2,f+=(a.height-d*t)/2,n.scaleOfWorld(r,t),r.scaleOf(r,t)}return n.move(l,f),r.move(l,f)}return n.worldBoxBounds};
|
package/dist/view.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
(function (draw) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
function getZoomScale(scaleX, type) {
|
|
5
|
+
let scale = 1;
|
|
6
|
+
const out = type === 'out', absScale = Math.abs(scaleX);
|
|
7
|
+
if (absScale > 1) {
|
|
8
|
+
while (out ? scale < absScale : scale <= absScale)
|
|
9
|
+
scale *= 2;
|
|
10
|
+
if (out)
|
|
11
|
+
scale /= 2;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
while (out ? scale >= absScale : scale > absScale)
|
|
15
|
+
scale /= 2;
|
|
16
|
+
if (!out)
|
|
17
|
+
scale *= 2;
|
|
18
|
+
}
|
|
19
|
+
return scale / scaleX;
|
|
20
|
+
}
|
|
21
|
+
function getFixBounds(bounds, scaleBounds) {
|
|
22
|
+
let { x, y, width, height } = bounds;
|
|
23
|
+
let fix;
|
|
24
|
+
if (!height)
|
|
25
|
+
height = width * (scaleBounds.height / scaleBounds.width), fix = true;
|
|
26
|
+
if (!width)
|
|
27
|
+
width = height * (scaleBounds.width / scaleBounds.height), fix = true;
|
|
28
|
+
return fix ? { x, y, width, height } : bounds;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
draw.Leafer.prototype.zoom = function (zoomType, padding, fixed) {
|
|
32
|
+
const { zoomLayer } = this;
|
|
33
|
+
const limitBounds = this.canvas.bounds.clone().shrink(padding ? padding : 30), bounds = new draw.Bounds();
|
|
34
|
+
const center = { x: limitBounds.x + limitBounds.width / 2, y: limitBounds.y + limitBounds.height / 2 };
|
|
35
|
+
let scale;
|
|
36
|
+
if (typeof zoomType === 'string') {
|
|
37
|
+
const { scaleX } = this.__;
|
|
38
|
+
switch (zoomType) {
|
|
39
|
+
case 'in':
|
|
40
|
+
scale = getZoomScale(scaleX, 'in');
|
|
41
|
+
break;
|
|
42
|
+
case 'out':
|
|
43
|
+
scale = getZoomScale(scaleX, 'out');
|
|
44
|
+
break;
|
|
45
|
+
case 'fit':
|
|
46
|
+
zoomType = this.boxBounds;
|
|
47
|
+
break;
|
|
48
|
+
case 'fit-width':
|
|
49
|
+
zoomType = new draw.Bounds(this.boxBounds);
|
|
50
|
+
zoomType.height = 0;
|
|
51
|
+
break;
|
|
52
|
+
case 'fit-height':
|
|
53
|
+
zoomType = new draw.Bounds(this.boxBounds);
|
|
54
|
+
zoomType.width = 0;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else if (typeof zoomType === 'number') {
|
|
59
|
+
scale = zoomType;
|
|
60
|
+
}
|
|
61
|
+
if (scale) {
|
|
62
|
+
zoomLayer.scaleOfWorld(center, this.validScale(scale));
|
|
63
|
+
}
|
|
64
|
+
else if (typeof zoomType === 'object') {
|
|
65
|
+
const isArray = zoomType instanceof Array;
|
|
66
|
+
if (isArray || zoomType.tag) {
|
|
67
|
+
const list = isArray ? zoomType : [zoomType];
|
|
68
|
+
bounds.setListWithFn(list, draw.LeafBoundsHelper.worldBounds);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
const innerBounds = getFixBounds(zoomType, limitBounds);
|
|
72
|
+
bounds.set(zoomLayer.getWorldBounds(innerBounds));
|
|
73
|
+
}
|
|
74
|
+
const { x, y, width, height } = bounds;
|
|
75
|
+
let moveX = limitBounds.x - x, moveY = limitBounds.y - y;
|
|
76
|
+
if (fixed) {
|
|
77
|
+
moveX += Math.max((limitBounds.width - width) / 2, 0);
|
|
78
|
+
moveY += Math.max((limitBounds.height - height) / 2, 0);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
const fitScale = this.validScale(Math.min(limitBounds.width / width, limitBounds.height / height));
|
|
82
|
+
moveX += (limitBounds.width - width * fitScale) / 2;
|
|
83
|
+
moveY += (limitBounds.height - height * fitScale) / 2;
|
|
84
|
+
zoomLayer.scaleOfWorld(bounds, fitScale);
|
|
85
|
+
bounds.scaleOf(bounds, fitScale);
|
|
86
|
+
}
|
|
87
|
+
zoomLayer.move(moveX, moveY);
|
|
88
|
+
return bounds.move(moveX, moveY);
|
|
89
|
+
}
|
|
90
|
+
return zoomLayer.worldBoxBounds;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
})(LeaferUI);
|
package/dist/view.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t){"use strict";function e(t,e){let i=1;const s="out"===e,o=Math.abs(t);if(o>1){for(;s?i<o:i<=o;)i*=2;s&&(i/=2)}else{for(;s?i>=o:i>o;)i/=2;s||(i*=2)}return i/t}t.Leafer.prototype.zoom=function(i,s,o){const{zoomLayer:h}=this,n=this.canvas.bounds.clone().shrink(s||30),a=new t.Bounds,r={x:n.x+n.width/2,y:n.y+n.height/2};let c;if("string"==typeof i){const{scaleX:s}=this.__;switch(i){case"in":c=e(s,"in");break;case"out":c=e(s,"out");break;case"fit":i=this.boxBounds;break;case"fit-width":(i=new t.Bounds(this.boxBounds)).height=0;break;case"fit-height":(i=new t.Bounds(this.boxBounds)).width=0}}else"number"==typeof i&&(c=i);if(c)h.scaleOfWorld(r,this.validScale(c));else if("object"==typeof i){const e=i instanceof Array;if(e||i.tag){const s=e?i:[i];a.setListWithFn(s,t.LeafBoundsHelper.worldBounds)}else{const t=function(t,e){let i,{x:s,y:o,width:h,height:n}=t;return n||(n=h*(e.height/e.width),i=!0),h||(h=n*(e.width/e.height),i=!0),i?{x:s,y:o,width:h,height:n}:t}(i,n);a.set(h.getWorldBounds(t))}const{x:s,y:r,width:c,height:d}=a;let f=n.x-s,l=n.y-r;if(o)f+=Math.max((n.width-c)/2,0),l+=Math.max((n.height-d)/2,0);else{const t=this.validScale(Math.min(n.width/c,n.height/d));f+=(n.width-c*t)/2,l+=(n.height-d*t)/2,h.scaleOfWorld(a,t),a.scaleOf(a,t)}return h.move(f,l),a.move(f,l)}return h.worldBoxBounds}}(LeaferUI);
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@leafer-in/view",
|
|
3
|
+
"version": "1.0.0-rc.18",
|
|
4
|
+
"description": "@leafer-in/view",
|
|
5
|
+
"author": "Chao (Leafer) Wan",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/view.esm.js",
|
|
8
|
+
"unpkg": "dist/view.js",
|
|
9
|
+
"jsdelivr": "dist/view.js",
|
|
10
|
+
"types": "types/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"src",
|
|
13
|
+
"types",
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/leaferjs/in.git"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/leaferjs/in/tree/main/packages/view",
|
|
21
|
+
"bugs": "https://github.com/leaferjs/in/issues",
|
|
22
|
+
"keywords": [
|
|
23
|
+
"leafer view",
|
|
24
|
+
"leafer-view",
|
|
25
|
+
"leafer-in",
|
|
26
|
+
"view",
|
|
27
|
+
"leafer-ui",
|
|
28
|
+
"leaferjs"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@leafer-ui/draw": "1.0.0-rc.18"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@leafer-ui/interface": "1.0.0-rc.18",
|
|
35
|
+
"@leafer-in/interface": "1.0.0-rc.18"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/src/helper.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IBoundsData } from '@leafer-ui/interface'
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export function getZoomScale(scaleX: number, type: 'in' | 'out'): number {
|
|
5
|
+
let scale = 1
|
|
6
|
+
const out = type === 'out', absScale = Math.abs(scaleX)
|
|
7
|
+
if (absScale > 1) {
|
|
8
|
+
while (out ? scale < absScale : scale <= absScale) scale *= 2
|
|
9
|
+
if (out) scale /= 2
|
|
10
|
+
} else {
|
|
11
|
+
while (out ? scale >= absScale : scale > absScale) scale /= 2
|
|
12
|
+
if (!out) scale *= 2
|
|
13
|
+
}
|
|
14
|
+
return scale / scaleX
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function getFixBounds(bounds: IBoundsData, scaleBounds: IBoundsData): IBoundsData {
|
|
18
|
+
let { x, y, width, height } = bounds
|
|
19
|
+
let fix: boolean
|
|
20
|
+
if (!height) height = width * (scaleBounds.height / scaleBounds.width), fix = true
|
|
21
|
+
if (!width) width = height * (scaleBounds.width / scaleBounds.height), fix = true
|
|
22
|
+
return fix ? { x, y, width, height } : bounds
|
|
23
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ILeaf, IBoundsData, IZoomType, IFourNumber, IPointData } from '@leafer-ui/interface'
|
|
2
|
+
import { Leafer, Bounds, LeafBoundsHelper } from '@leafer-ui/draw'
|
|
3
|
+
|
|
4
|
+
import { getFixBounds, getZoomScale } from './helper'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Leafer.prototype.zoom = function (zoomType: IZoomType, padding?: IFourNumber, fixed?: boolean): IBoundsData {
|
|
8
|
+
|
|
9
|
+
const { zoomLayer } = this
|
|
10
|
+
const limitBounds = this.canvas.bounds.clone().shrink(padding ? padding : 30), bounds = new Bounds()
|
|
11
|
+
const center: IPointData = { x: limitBounds.x + limitBounds.width / 2, y: limitBounds.y + limitBounds.height / 2 }
|
|
12
|
+
|
|
13
|
+
let scale: number
|
|
14
|
+
|
|
15
|
+
if (typeof zoomType === 'string') {
|
|
16
|
+
|
|
17
|
+
const { scaleX } = this.__
|
|
18
|
+
|
|
19
|
+
switch (zoomType) {
|
|
20
|
+
case 'in':
|
|
21
|
+
scale = getZoomScale(scaleX, 'in')
|
|
22
|
+
break
|
|
23
|
+
case 'out':
|
|
24
|
+
scale = getZoomScale(scaleX, 'out')
|
|
25
|
+
break
|
|
26
|
+
case 'fit':
|
|
27
|
+
zoomType = this.boxBounds
|
|
28
|
+
break
|
|
29
|
+
case 'fit-width':
|
|
30
|
+
zoomType = new Bounds(this.boxBounds)
|
|
31
|
+
zoomType.height = 0
|
|
32
|
+
break
|
|
33
|
+
case 'fit-height':
|
|
34
|
+
zoomType = new Bounds(this.boxBounds)
|
|
35
|
+
zoomType.width = 0
|
|
36
|
+
break
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
} else if (typeof zoomType === 'number') {
|
|
40
|
+
scale = zoomType
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
if (scale) {
|
|
45
|
+
|
|
46
|
+
zoomLayer.scaleOfWorld(center, this.validScale(scale))
|
|
47
|
+
|
|
48
|
+
} else if (typeof zoomType === 'object') {
|
|
49
|
+
|
|
50
|
+
const isArray = zoomType instanceof Array
|
|
51
|
+
|
|
52
|
+
if (isArray || (zoomType as ILeaf).tag) {
|
|
53
|
+
const list: ILeaf[] = isArray ? zoomType as ILeaf[] : [zoomType as ILeaf]
|
|
54
|
+
bounds.setListWithFn(list, LeafBoundsHelper.worldBounds)
|
|
55
|
+
} else {
|
|
56
|
+
const innerBounds = getFixBounds(zoomType as IBoundsData, limitBounds)
|
|
57
|
+
bounds.set(zoomLayer.getWorldBounds(innerBounds))
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const { x, y, width, height } = bounds
|
|
61
|
+
let moveX = limitBounds.x - x, moveY = limitBounds.y - y
|
|
62
|
+
|
|
63
|
+
if (fixed) {
|
|
64
|
+
|
|
65
|
+
moveX += Math.max((limitBounds.width - width) / 2, 0)
|
|
66
|
+
moveY += Math.max((limitBounds.height - height) / 2, 0)
|
|
67
|
+
|
|
68
|
+
} else {
|
|
69
|
+
|
|
70
|
+
const fitScale = this.validScale(Math.min(limitBounds.width / width, limitBounds.height / height))
|
|
71
|
+
moveX += (limitBounds.width - width * fitScale) / 2
|
|
72
|
+
moveY += (limitBounds.height - height * fitScale) / 2
|
|
73
|
+
|
|
74
|
+
zoomLayer.scaleOfWorld(bounds, fitScale)
|
|
75
|
+
bounds.scaleOf(bounds, fitScale)
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
zoomLayer.move(moveX, moveY)
|
|
80
|
+
return bounds.move(moveX, moveY)
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return zoomLayer.worldBoxBounds
|
|
85
|
+
|
|
86
|
+
}
|
package/types/index.d.ts
ADDED