playhtml 2.1.6 → 2.1.7
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/CHANGELOG.md +1 -1
- package/dist/playhtml.es.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/playhtml.es.js
CHANGED
|
@@ -6754,22 +6754,22 @@ class ia {
|
|
|
6754
6754
|
(f = this.onClick) == null || f.call(this, u, this.getEventHandlerData());
|
|
6755
6755
|
}), this.onClick = o, c && !this.onDrag && (t.addEventListener("touchstart", (u) => {
|
|
6756
6756
|
var p;
|
|
6757
|
-
u.preventDefault(), (p = this.onDragStart) == null || p.call(this, u, this.getEventHandlerData());
|
|
6757
|
+
u.preventDefault(), t.classList.add("cursordown"), (p = this.onDragStart) == null || p.call(this, u, this.getEventHandlerData());
|
|
6758
6758
|
const f = (_) => {
|
|
6759
6759
|
var Y;
|
|
6760
6760
|
_.preventDefault(), (Y = this.onDrag) == null || Y.call(this, _, this.getEventHandlerData());
|
|
6761
6761
|
}, g = (_) => {
|
|
6762
|
-
document.removeEventListener("touchmove", f), document.removeEventListener("touchend", g);
|
|
6762
|
+
t.classList.remove("cursordown"), document.removeEventListener("touchmove", f), document.removeEventListener("touchend", g);
|
|
6763
6763
|
};
|
|
6764
6764
|
document.addEventListener("touchmove", f), document.addEventListener("touchend", g);
|
|
6765
6765
|
}), t.addEventListener("mousedown", (u) => {
|
|
6766
6766
|
var p;
|
|
6767
|
-
u.preventDefault(), (p = this.onDragStart) == null || p.call(this, u, this.getEventHandlerData());
|
|
6767
|
+
u.preventDefault(), (p = this.onDragStart) == null || p.call(this, u, this.getEventHandlerData()), t.classList.add("cursordown");
|
|
6768
6768
|
const f = (_) => {
|
|
6769
6769
|
var Y;
|
|
6770
6770
|
_.preventDefault(), (Y = this.onDrag) == null || Y.call(this, _, this.getEventHandlerData());
|
|
6771
6771
|
}, g = (_) => {
|
|
6772
|
-
document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", g);
|
|
6772
|
+
t.classList.remove("cursordown"), document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", g);
|
|
6773
6773
|
};
|
|
6774
6774
|
document.addEventListener("mousemove", f), document.addEventListener("mouseup", g);
|
|
6775
6775
|
})), this.onDrag = c, this.onDragStart = l, a && !this.resetShortcut && (t.title || (t.title = `Hold down the ${Xl[a]} key while clicking to reset.`), t.reset = this.reset, t.addEventListener("click", (u) => {
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.__playhtml-can-move{cursor:
|
|
1
|
+
@charset "UTF-8";.__playhtml-can-move{cursor:grab;transition:transform .15s;will-change:transform}.__playhtml-can-move.cursordown{cursor:grabbing}.__playhtml-can-spin{cursor:grab;transition:transform .25s;will-change:transform}.__playhtml-can-spin.cursordown{cursor:grabbing}.__playhtml-can-grow{cursor:pointer;transition:transform .25s;will-change:transform}.__playhtml-can-toggle,.__playhtml-can-draw{cursor:pointer}.__playhtml-can-draw .__playhtml-draw-container{position:relative;width:100%;height:100%;cursor:none}.__playhtml-can-draw .__playhtml-draw-container canvas{position:absolute;top:0;left:0;cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewport='0 0 100 100' style='overflow: visible; fill:black;font-size:20px;'><text y='-30%' x='-50%' style='transform:rotate(180deg)'>🖍️</text></svg>") 16 0,auto}body .__playhtml-element.editing:nth-child(2n){animation-name:jiggle1;animation-iteration-count:infinite;transform-origin:50% 10%;animation-duration:.25s;animation-delay:var(--jiggle-delay)}body .__playhtml-element.editing:nth-child(2n-1){animation-name:jiggle2;animation-iteration-count:infinite;animation-direction:alternate;transform-origin:30% 5%;animation-duration:.45s;animation-delay:var(--jiggle-delay)}@keyframes jiggle1{0%{transform:rotate(-1deg);animation-timing-function:ease-in}50%{transform:rotate(1.5deg);animation-timing-function:ease-out}}@keyframes jiggle2{0%{transform:rotate(1deg);animation-timing-function:ease-in}50%{transform:rotate(-1.5deg);animation-timing-function:ease-out}}
|