microboard-ui-temp 0.3.7 → 0.3.8
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/dist/{chunk-f0mvcsbm.css → chunk-dn1bhr0e.css} +0 -6
- package/dist/{chunk-c47kwavk.js → chunk-mq91cbqc.js} +13 -14
- package/dist/example.html +2 -2
- package/dist/index.css +0 -6
- package/dist/index.html +2 -2
- package/dist/index.js +13 -14
- package/dist/spa.css +0 -6
- package/dist/spa.js +13 -14
- package/package.json +2 -2
|
@@ -3003,12 +3003,6 @@ a.link_jFMnzg {
|
|
|
3003
3003
|
background-color: #f7f7f8;
|
|
3004
3004
|
}
|
|
3005
3005
|
|
|
3006
|
-
.quaternary_Lhh5GA {
|
|
3007
|
-
color: #fff;
|
|
3008
|
-
background-color: #924fe8;
|
|
3009
|
-
border: 1px solid #924fe8;
|
|
3010
|
-
}
|
|
3011
|
-
|
|
3012
3006
|
.quaternary_Lhh5GA:hover {
|
|
3013
3007
|
background-color: #b799f5;
|
|
3014
3008
|
border: 1px solid #924fe8;
|
|
@@ -276879,32 +276879,31 @@ class Camera {
|
|
|
276879
276879
|
this.zoomRelativeToPointBy(scale, this.pointer.x, this.pointer.y);
|
|
276880
276880
|
}
|
|
276881
276881
|
zoomRelativeToPointBy(scale, x, y, duration = 400) {
|
|
276882
|
-
const
|
|
276883
|
-
const
|
|
276884
|
-
const
|
|
276885
|
-
const
|
|
276882
|
+
const base3 = this.localAnimationTarget ?? this.matrix;
|
|
276883
|
+
const startScaleX = base3.scaleX;
|
|
276884
|
+
const startScaleY = base3.scaleY;
|
|
276885
|
+
const startTranslateX = base3.translateX;
|
|
276886
|
+
const startTranslateY = base3.translateY;
|
|
276886
276887
|
const boardPointX = (x - startTranslateX) / startScaleX;
|
|
276887
276888
|
const boardPointY = (y - startTranslateY) / startScaleY;
|
|
276888
|
-
const
|
|
276889
|
-
const
|
|
276890
|
-
const targetTranslateX = x - boardPointX * targetScaleX;
|
|
276891
|
-
const targetTranslateY = y - boardPointY * targetScaleY;
|
|
276892
|
-
const finalScaleX = this.limitScale(targetScaleX);
|
|
276893
|
-
const finalScaleY = this.limitScale(targetScaleY);
|
|
276889
|
+
const finalScaleX = this.limitScale(startScaleX * scale);
|
|
276890
|
+
const finalScaleY = this.limitScale(startScaleY * scale);
|
|
276894
276891
|
if (finalScaleX === startScaleX && finalScaleY === startScaleY) {
|
|
276895
276892
|
return;
|
|
276896
276893
|
}
|
|
276894
|
+
const finalTranslateX = x - boardPointX * finalScaleX;
|
|
276895
|
+
const finalTranslateY = y - boardPointY * finalScaleY;
|
|
276897
276896
|
if (duration === 0) {
|
|
276898
|
-
this.matrix.translateX =
|
|
276899
|
-
this.matrix.translateY =
|
|
276897
|
+
this.matrix.translateX = finalTranslateX;
|
|
276898
|
+
this.matrix.translateY = finalTranslateY;
|
|
276900
276899
|
this.matrix.scaleX = finalScaleX;
|
|
276901
276900
|
this.matrix.scaleY = finalScaleY;
|
|
276902
276901
|
this.subject.publish(this);
|
|
276903
276902
|
return;
|
|
276904
276903
|
}
|
|
276905
276904
|
this.animateLocalToTarget({
|
|
276906
|
-
translateX:
|
|
276907
|
-
translateY:
|
|
276905
|
+
translateX: finalTranslateX,
|
|
276906
|
+
translateY: finalTranslateY,
|
|
276908
276907
|
scaleX: finalScaleX,
|
|
276909
276908
|
scaleY: finalScaleY
|
|
276910
276909
|
});
|
package/dist/example.html
CHANGED
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
rel="stylesheet"
|
|
32
32
|
/>
|
|
33
33
|
|
|
34
|
-
<link rel="stylesheet" crossorigin href="/chunk-
|
|
35
|
-
<script type="module" crossorigin src="/chunk-
|
|
34
|
+
<link rel="stylesheet" crossorigin href="/chunk-dn1bhr0e.css"><script src="/env.js"></script>
|
|
35
|
+
<script type="module" crossorigin src="/chunk-mq91cbqc.js"></script></head>
|
|
36
36
|
|
|
37
37
|
<body
|
|
38
38
|
style="
|
package/dist/index.css
CHANGED
|
@@ -2862,12 +2862,6 @@ a.link_jFMnzg {
|
|
|
2862
2862
|
background-color: #f7f7f8;
|
|
2863
2863
|
}
|
|
2864
2864
|
|
|
2865
|
-
.quaternary_Lhh5GA {
|
|
2866
|
-
color: #fff;
|
|
2867
|
-
background-color: #924fe8;
|
|
2868
|
-
border: 1px solid #924fe8;
|
|
2869
|
-
}
|
|
2870
|
-
|
|
2871
2865
|
.quaternary_Lhh5GA:hover {
|
|
2872
2866
|
background-color: #b799f5;
|
|
2873
2867
|
border: 1px solid #924fe8;
|
package/dist/index.html
CHANGED
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
rel="stylesheet"
|
|
32
32
|
/>
|
|
33
33
|
|
|
34
|
-
<link rel="stylesheet" crossorigin href="/chunk-
|
|
35
|
-
<script type="module" crossorigin src="/chunk-
|
|
34
|
+
<link rel="stylesheet" crossorigin href="/chunk-dn1bhr0e.css"><script src="/env.js"></script>
|
|
35
|
+
<script type="module" crossorigin src="/chunk-mq91cbqc.js"></script></head>
|
|
36
36
|
|
|
37
37
|
<body
|
|
38
38
|
style="
|
package/dist/index.js
CHANGED
|
@@ -276879,32 +276879,31 @@ class Camera {
|
|
|
276879
276879
|
this.zoomRelativeToPointBy(scale, this.pointer.x, this.pointer.y);
|
|
276880
276880
|
}
|
|
276881
276881
|
zoomRelativeToPointBy(scale, x, y, duration = 400) {
|
|
276882
|
-
const
|
|
276883
|
-
const
|
|
276884
|
-
const
|
|
276885
|
-
const
|
|
276882
|
+
const base3 = this.localAnimationTarget ?? this.matrix;
|
|
276883
|
+
const startScaleX = base3.scaleX;
|
|
276884
|
+
const startScaleY = base3.scaleY;
|
|
276885
|
+
const startTranslateX = base3.translateX;
|
|
276886
|
+
const startTranslateY = base3.translateY;
|
|
276886
276887
|
const boardPointX = (x - startTranslateX) / startScaleX;
|
|
276887
276888
|
const boardPointY = (y - startTranslateY) / startScaleY;
|
|
276888
|
-
const
|
|
276889
|
-
const
|
|
276890
|
-
const targetTranslateX = x - boardPointX * targetScaleX;
|
|
276891
|
-
const targetTranslateY = y - boardPointY * targetScaleY;
|
|
276892
|
-
const finalScaleX = this.limitScale(targetScaleX);
|
|
276893
|
-
const finalScaleY = this.limitScale(targetScaleY);
|
|
276889
|
+
const finalScaleX = this.limitScale(startScaleX * scale);
|
|
276890
|
+
const finalScaleY = this.limitScale(startScaleY * scale);
|
|
276894
276891
|
if (finalScaleX === startScaleX && finalScaleY === startScaleY) {
|
|
276895
276892
|
return;
|
|
276896
276893
|
}
|
|
276894
|
+
const finalTranslateX = x - boardPointX * finalScaleX;
|
|
276895
|
+
const finalTranslateY = y - boardPointY * finalScaleY;
|
|
276897
276896
|
if (duration === 0) {
|
|
276898
|
-
this.matrix.translateX =
|
|
276899
|
-
this.matrix.translateY =
|
|
276897
|
+
this.matrix.translateX = finalTranslateX;
|
|
276898
|
+
this.matrix.translateY = finalTranslateY;
|
|
276900
276899
|
this.matrix.scaleX = finalScaleX;
|
|
276901
276900
|
this.matrix.scaleY = finalScaleY;
|
|
276902
276901
|
this.subject.publish(this);
|
|
276903
276902
|
return;
|
|
276904
276903
|
}
|
|
276905
276904
|
this.animateLocalToTarget({
|
|
276906
|
-
translateX:
|
|
276907
|
-
translateY:
|
|
276905
|
+
translateX: finalTranslateX,
|
|
276906
|
+
translateY: finalTranslateY,
|
|
276908
276907
|
scaleX: finalScaleX,
|
|
276909
276908
|
scaleY: finalScaleY
|
|
276910
276909
|
});
|
package/dist/spa.css
CHANGED
|
@@ -2862,12 +2862,6 @@ a.link_jFMnzg {
|
|
|
2862
2862
|
background-color: #f7f7f8;
|
|
2863
2863
|
}
|
|
2864
2864
|
|
|
2865
|
-
.quaternary_Lhh5GA {
|
|
2866
|
-
color: #fff;
|
|
2867
|
-
background-color: #924fe8;
|
|
2868
|
-
border: 1px solid #924fe8;
|
|
2869
|
-
}
|
|
2870
|
-
|
|
2871
2865
|
.quaternary_Lhh5GA:hover {
|
|
2872
2866
|
background-color: #b799f5;
|
|
2873
2867
|
border: 1px solid #924fe8;
|
package/dist/spa.js
CHANGED
|
@@ -276879,32 +276879,31 @@ class Camera {
|
|
|
276879
276879
|
this.zoomRelativeToPointBy(scale, this.pointer.x, this.pointer.y);
|
|
276880
276880
|
}
|
|
276881
276881
|
zoomRelativeToPointBy(scale, x, y, duration = 400) {
|
|
276882
|
-
const
|
|
276883
|
-
const
|
|
276884
|
-
const
|
|
276885
|
-
const
|
|
276882
|
+
const base3 = this.localAnimationTarget ?? this.matrix;
|
|
276883
|
+
const startScaleX = base3.scaleX;
|
|
276884
|
+
const startScaleY = base3.scaleY;
|
|
276885
|
+
const startTranslateX = base3.translateX;
|
|
276886
|
+
const startTranslateY = base3.translateY;
|
|
276886
276887
|
const boardPointX = (x - startTranslateX) / startScaleX;
|
|
276887
276888
|
const boardPointY = (y - startTranslateY) / startScaleY;
|
|
276888
|
-
const
|
|
276889
|
-
const
|
|
276890
|
-
const targetTranslateX = x - boardPointX * targetScaleX;
|
|
276891
|
-
const targetTranslateY = y - boardPointY * targetScaleY;
|
|
276892
|
-
const finalScaleX = this.limitScale(targetScaleX);
|
|
276893
|
-
const finalScaleY = this.limitScale(targetScaleY);
|
|
276889
|
+
const finalScaleX = this.limitScale(startScaleX * scale);
|
|
276890
|
+
const finalScaleY = this.limitScale(startScaleY * scale);
|
|
276894
276891
|
if (finalScaleX === startScaleX && finalScaleY === startScaleY) {
|
|
276895
276892
|
return;
|
|
276896
276893
|
}
|
|
276894
|
+
const finalTranslateX = x - boardPointX * finalScaleX;
|
|
276895
|
+
const finalTranslateY = y - boardPointY * finalScaleY;
|
|
276897
276896
|
if (duration === 0) {
|
|
276898
|
-
this.matrix.translateX =
|
|
276899
|
-
this.matrix.translateY =
|
|
276897
|
+
this.matrix.translateX = finalTranslateX;
|
|
276898
|
+
this.matrix.translateY = finalTranslateY;
|
|
276900
276899
|
this.matrix.scaleX = finalScaleX;
|
|
276901
276900
|
this.matrix.scaleY = finalScaleY;
|
|
276902
276901
|
this.subject.publish(this);
|
|
276903
276902
|
return;
|
|
276904
276903
|
}
|
|
276905
276904
|
this.animateLocalToTarget({
|
|
276906
|
-
translateX:
|
|
276907
|
-
translateY:
|
|
276905
|
+
translateX: finalTranslateX,
|
|
276906
|
+
translateY: finalTranslateY,
|
|
276908
276907
|
scaleX: finalScaleX,
|
|
276909
276908
|
scaleY: finalScaleY
|
|
276910
276909
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microboard-ui-temp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
80
80
|
"js-cookie": "^3.0.5",
|
|
81
81
|
"jwt-decode": "^4.0.0",
|
|
82
|
-
"microboard-temp": "^0.6.
|
|
82
|
+
"microboard-temp": "^0.6.5",
|
|
83
83
|
"nanoid": "^5.1.5",
|
|
84
84
|
"prop-types": "^15.8.1",
|
|
85
85
|
"react-hot-toast": "2.4.1",
|