zimjs 17.2.2 → 17.2.4
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/.gitattributes +1 -0
- package/.github/FUNDING.yml +1 -1
- package/package.json +1 -1
- package/src/zim.js +125 -55
package/.gitattributes
CHANGED
package/.github/FUNDING.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# These are supported funding model platforms
|
|
2
2
|
|
|
3
|
-
github:
|
|
3
|
+
github: [danzen]
|
|
4
4
|
patreon: zimjs
|
|
5
5
|
open_collective: # Replace with a single Open Collective username
|
|
6
6
|
ko_fi: # Replace with a single Ko-fi username
|
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -10816,16 +10816,16 @@ NOTE: as of ZIM 5.5.0 the zim namespace is no longer required (unless zns is set
|
|
|
10816
10816
|
|
|
10817
10817
|
EXAMPLE
|
|
10818
10818
|
// slice a pic in four at 25% from the edges, scale the middle and keep the sides and corners not scaled.
|
|
10819
|
-
new SlicedBitmap(1600, pic.height, pic, [0.25,0.75],[0.25,0.75]], [[0,1,0],[0,1,0])
|
|
10819
|
+
new SlicedBitmap(1600, pic.height, pic, [[0.25,0.75],[0.25,0.75]], [[0,1,0],[0,1,0]])
|
|
10820
10820
|
.center()
|
|
10821
10821
|
.transform({minScaleX:.05, minScaleY:.05});
|
|
10822
10822
|
END EXAMPLE
|
|
10823
10823
|
|
|
10824
10824
|
EXAMPLE
|
|
10825
10825
|
// slice a pic in four at 25% from the edges, scale the middle and keep the sides and corners not scaled.
|
|
10826
|
-
const pic = new Pic("
|
|
10827
|
-
const startSlices = [0.25,0.75],[0.25,0.75]];
|
|
10828
|
-
const startTypes = [[0,2,0],[0,1,0]; // middle is tiled horizontally and stretched vertically
|
|
10826
|
+
const pic = new Pic("pic.png"); // preload this in Frame() or loadAssets()
|
|
10827
|
+
const startSlices = [[0.25,0.75],[0.25,0.75]];
|
|
10828
|
+
const startTypes = [[0,2,0],[0,1,0]]; // middle is tiled horizontally and stretched vertically
|
|
10829
10829
|
const slicer = new Slicer({
|
|
10830
10830
|
obj:pic.clone(), // slicer will adjust obj so clone the pic so can use it unaffected later
|
|
10831
10831
|
scale:.5,
|
|
@@ -17592,36 +17592,35 @@ Note the points property has been split into points and pointObjects (and there
|
|
|
17592
17592
|
};
|
|
17593
17593
|
|
|
17594
17594
|
// squiggle
|
|
17595
|
-
if (that.interactive) {
|
|
17596
|
-
|
|
17597
|
-
|
|
17598
|
-
|
|
17599
|
-
|
|
17600
|
-
|
|
17601
|
-
|
|
17602
|
-
|
|
17603
|
-
|
|
17604
|
-
|
|
17605
|
-
|
|
17606
|
-
|
|
17607
|
-
|
|
17608
|
-
|
|
17609
|
-
|
|
17610
|
-
|
|
17611
|
-
|
|
17612
|
-
|
|
17613
|
-
|
|
17614
|
-
|
|
17615
|
-
|
|
17616
|
-
|
|
17617
|
-
|
|
17618
|
-
|
|
17619
|
-
|
|
17620
|
-
|
|
17621
|
-
});
|
|
17595
|
+
if (that.interactive && move) shape.drag({onTop:false});
|
|
17596
|
+
moveDownEvent = shape.on("mousedown", function(e) {
|
|
17597
|
+
stage = e.target.stage;
|
|
17598
|
+
startPosition = {x:shape.x, y:shape.y};
|
|
17599
|
+
if (that.selectPoints) that.keyFocus = true;
|
|
17600
|
+
upTop();
|
|
17601
|
+
});
|
|
17602
|
+
movePressEvent = shape.on("pressmove", function() {
|
|
17603
|
+
sets.x = shape.x;
|
|
17604
|
+
sets.y = shape.y;
|
|
17605
|
+
sticks.x = shape.x;
|
|
17606
|
+
sticks.y = shape.y;
|
|
17607
|
+
});
|
|
17608
|
+
moveUpEvent = shape.on("pressup", function() {
|
|
17609
|
+
var moveControlCheck = (shape.x != startPosition.x || shape.y != startPosition.y);
|
|
17610
|
+
var movePoint = shape.localToLocal(that.regX,that.regY,that.parent);
|
|
17611
|
+
that.x = movePoint.x;
|
|
17612
|
+
that.y = movePoint.y;
|
|
17613
|
+
sets.x = sets.y = sticks.x = sticks.y = shape.x = shape.y = 0;
|
|
17614
|
+
if (moveControlCheck) {
|
|
17615
|
+
var ev = new createjs.Event("change");
|
|
17616
|
+
ev.controlType = "move";
|
|
17617
|
+
that.dispatchEvent(ev);
|
|
17618
|
+
}
|
|
17619
|
+
if (stage) stage.update();
|
|
17620
|
+
});
|
|
17622
17621
|
|
|
17623
|
-
|
|
17624
|
-
|
|
17622
|
+
if (!that.move) stopDragging(true); // true is first time
|
|
17623
|
+
|
|
17625
17624
|
|
|
17626
17625
|
function upTop() {
|
|
17627
17626
|
if (that.onTop) {
|
|
@@ -27649,6 +27648,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
27649
27648
|
if (replace) that.contentContainer.removeAllChildren();
|
|
27650
27649
|
if (center) obj.center(that.contentContainer, index);
|
|
27651
27650
|
else obj.addTo(that.contentContainer, index);
|
|
27651
|
+
// addHTML(that.contentContainer);
|
|
27652
27652
|
return that;
|
|
27653
27653
|
}
|
|
27654
27654
|
|
|
@@ -29112,6 +29112,10 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29112
29112
|
}
|
|
29113
29113
|
|
|
29114
29114
|
this._enabled = true;
|
|
29115
|
+
var lastReadOnly;
|
|
29116
|
+
setTimeout(function() {
|
|
29117
|
+
lastReadOnly = that.readOnly;
|
|
29118
|
+
},50);
|
|
29115
29119
|
Object.defineProperty(that, 'enabled', {
|
|
29116
29120
|
get: function() {
|
|
29117
29121
|
return that._enabled;
|
|
@@ -29123,6 +29127,18 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
29123
29127
|
} else {
|
|
29124
29128
|
setDrag();
|
|
29125
29129
|
}
|
|
29130
|
+
if (that.blinker) {
|
|
29131
|
+
if (!value) {
|
|
29132
|
+
that.blinker.vis(false);
|
|
29133
|
+
that.selection.vis(false);
|
|
29134
|
+
lastReadOnly = that.readOnly;
|
|
29135
|
+
that.readOnly = true;
|
|
29136
|
+
} else {
|
|
29137
|
+
that.readOnly = lastReadOnly;
|
|
29138
|
+
if (!that.readOnly) that.blinker.vis(true);
|
|
29139
|
+
that.selection.vis(true);
|
|
29140
|
+
}
|
|
29141
|
+
}
|
|
29126
29142
|
zenable(that, value);
|
|
29127
29143
|
}
|
|
29128
29144
|
});
|
|
@@ -31109,7 +31125,12 @@ align - get or set the horizontal alignment of the text
|
|
|
31109
31125
|
color - gets or sets the label text color
|
|
31110
31126
|
backgroundColor - gets or sets the background color
|
|
31111
31127
|
readOnly - get or set the field as readOnly - also see readOnly parameter
|
|
31128
|
+
read only of true will allow selection and copy but not typing and cursor will be removed
|
|
31129
|
+
set enabled to false to not allow selection and copy
|
|
31112
31130
|
enabled - default is true - set to false to disable
|
|
31131
|
+
setting enabled false will remember the readOnly setting when enabled is set to false
|
|
31132
|
+
so when set to true again it will be that remembered readOnly and will not rememember any changes to readOnly made in-between
|
|
31133
|
+
so any in-between readOnly changes will have to be re-applied after enabled is set back to true
|
|
31113
31134
|
veeObj - an object with ZIM VEE original parameters:value allowing the ZIM VEE values to be referenced
|
|
31114
31135
|
for instance, obj.prop = Pick.choose(obj.veeObj.prop); will reset the the prop to the result of the original ZIM VEE value
|
|
31115
31136
|
|
|
@@ -31522,14 +31543,16 @@ zim.TextInput = function(width, height, placeholder, text, size, font, color, ba
|
|
|
31522
31543
|
|
|
31523
31544
|
Object.defineProperty(that, 'readOnly', {
|
|
31524
31545
|
get: function() {
|
|
31525
|
-
return readOnly;
|
|
31546
|
+
return readOnly;
|
|
31526
31547
|
},
|
|
31527
31548
|
set: function(value) {
|
|
31528
31549
|
readOnly = value;
|
|
31529
|
-
that.htmlTag.
|
|
31550
|
+
that.htmlTag.readOnly = readOnly;
|
|
31551
|
+
if (value) that.blinker.vis(false);
|
|
31552
|
+
else that.blinker.vis(true);
|
|
31530
31553
|
}
|
|
31531
31554
|
});
|
|
31532
|
-
|
|
31555
|
+
that.readOnly = readOnly;
|
|
31533
31556
|
|
|
31534
31557
|
Object.defineProperty(that, 'focus', {
|
|
31535
31558
|
get: function() {
|
|
@@ -32144,9 +32167,10 @@ list - (default Options 1-30) an array of strings, numbers or zim Label objects
|
|
|
32144
32167
|
note: the Accordion List is currently incompatible with the Organizer, addTo() and removeFrom()
|
|
32145
32168
|
viewNum - (default 5) how many items to show in the width and height provided
|
|
32146
32169
|
adjusting this number will also change the overall scale of custom items for horizontal lists
|
|
32147
|
-
|
|
32170
|
+
(this does not affect vertical lists due to the way vertical tabs are optimized)
|
|
32148
32171
|
or see the noScale parameter to avoid scaling custom items in horizontal lists
|
|
32149
32172
|
if no items are provided to start but rather added with addAt() then choose a viewNum that roughly matches how many items will fit in the view
|
|
32173
|
+
Note - the items will not be scaled larger by a viewNum setting... only scaled smaller.
|
|
32150
32174
|
vertical - (default true) set to false to make a horizontal list
|
|
32151
32175
|
currentSelected - (default false) set to true to show the current selection as highlighted
|
|
32152
32176
|
align - (default CENTER) horizontal align
|
|
@@ -32171,8 +32195,8 @@ borderColor - (default silver) border color
|
|
|
32171
32195
|
borderWidth - (default 1) the thickness of the border
|
|
32172
32196
|
padding - (default 0) places the content in from edges of border (see paddingH and paddingV)
|
|
32173
32197
|
corner - (default 0) is the rounded corner of the list (does not accept corner array - scrollBars are too complicated)
|
|
32174
|
-
swipe - (default
|
|
32175
|
-
also can set swipe to just
|
|
32198
|
+
swipe - (default AUTO/true) the direction for swiping set to NONE / false for no swiping
|
|
32199
|
+
also can set swipe to just VERTICAL or HORIZONTAL
|
|
32176
32200
|
scrollBarActive - (default true) shows scrollBar (set to false to not)
|
|
32177
32201
|
scrollBarDrag - (default true) set to false to not be able to drag the scrollBar
|
|
32178
32202
|
scrollBarColor - (default borderColor) the color of the scrollBar
|
|
@@ -34084,18 +34108,23 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
34084
34108
|
|
|
34085
34109
|
if (zot(align)) align = DS.align!=null?DS.align:"center";
|
|
34086
34110
|
if (zot(spacing)) spacing = DS.spacing!=null?DS.spacing:2;
|
|
34087
|
-
if (zot(backgroundColor)) backgroundColor = DS.backgroundColor!=null?DS.backgroundColor:zim.tin;
|
|
34111
|
+
if (zot(backgroundColor)) backgroundColor = DS.backgroundColor!=null?DS.backgroundColor:zim.tin;
|
|
34088
34112
|
if (zot(rollBackgroundColor)) rollBackgroundColor = DS.rollBackgroundColor!=null?DS.rollBackgroundColor:zim.grey;
|
|
34089
34113
|
if (zot(selectedBackgroundColor)) selectedBackgroundColor = DS.selectedBackgroundColor!=null?DS.selectedBackgroundColor:zim.charcoal;
|
|
34090
34114
|
if (zot(selectedRollBackgroundColor)) selectedRollBackgroundColor = DS.selectedRollBackgroundColor!=null?DS.selectedRollBackgroundColor:zim.grey;
|
|
34091
|
-
if (zot(color)) color = DS.color!=null?DS.color:zim.white;
|
|
34115
|
+
if (zot(color)) color = DS.color!=null?DS.color:zim.white;
|
|
34092
34116
|
if (zot(rollColor)) rollColor = DS.rollColor!=null?DS.rollColor:color;
|
|
34093
34117
|
if (zot(selectedColor)) selectedColor = DS.selectedColor!=null?DS.selectedColor:color;
|
|
34094
34118
|
if (zot(selectedRollColor)) selectedRollColor = DS.selectedRollColor!=null?DS.selectedRollColor:rollColor;
|
|
34095
34119
|
|
|
34096
34120
|
var c = new zim.Container();
|
|
34097
34121
|
c.type = "CheckItem";
|
|
34098
|
-
|
|
34122
|
+
label = zik(label);
|
|
34123
|
+
rollColor = zik(rollColor);
|
|
34124
|
+
selectedColor = zik(selectedColor);
|
|
34125
|
+
rollBackgroundColor = zik(rollBackgroundColor);
|
|
34126
|
+
|
|
34127
|
+
c.checkBox = new zim.CheckBox({size:size, label:label, color:color, tap:true});
|
|
34099
34128
|
c.backing = new zim.Rectangle(width-spacing*2, c.checkBox.height+paddingV*2, backgroundColor).addTo(c);
|
|
34100
34129
|
c.checkBox.center(c);
|
|
34101
34130
|
if (align != "center" && align != "middle") c.checkBox.pos(paddingH,null,align=="right");
|
|
@@ -36410,7 +36439,7 @@ NOTE: as of ZIM 5.5.0 the zim namespace is no longer required (unless zns is set
|
|
|
36410
36439
|
|
|
36411
36440
|
EXAMPLE
|
|
36412
36441
|
// slice a pic in four at 25% from the edges, scale the middle and keep the sides and corners not scaled.
|
|
36413
|
-
const pic = new Pic("
|
|
36442
|
+
const pic = new Pic("pic.png"); // preload this in Frame() or loadAssets()
|
|
36414
36443
|
const slicer = new Slicer({
|
|
36415
36444
|
obj:pic.clone(), // slicer will adjust obj so clone the pic so can use it unaffected later
|
|
36416
36445
|
scale:.5,
|
|
@@ -36421,7 +36450,7 @@ const slicer = new Slicer({
|
|
|
36421
36450
|
|
|
36422
36451
|
slicer.on("loaded", ()=>{
|
|
36423
36452
|
if (preview) preview.dispose();
|
|
36424
|
-
preview = new
|
|
36453
|
+
preview = new SlicedBitmap(1600, 600, slicer.obj.clone(), slicer.slices, slicer.types, 2, .5)
|
|
36425
36454
|
.pos(0,100,CENTER,BOTTOM)
|
|
36426
36455
|
.transform({minScaleX:.05, minScaleY:.05});
|
|
36427
36456
|
});
|
|
@@ -36947,6 +36976,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
36947
36976
|
loader.resize();
|
|
36948
36977
|
}
|
|
36949
36978
|
adjustBoxes();
|
|
36979
|
+
|
|
36950
36980
|
if (obj.width) {
|
|
36951
36981
|
obj.scaleTo(that.box,100,100).loc(0,0,sc,0);
|
|
36952
36982
|
that.stage.update();
|
|
@@ -36955,7 +36985,8 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
36955
36985
|
obj.scaleTo(that.box,100,100).loc(0,0,sc,0);
|
|
36956
36986
|
that.stage.update();
|
|
36957
36987
|
}, 50);
|
|
36958
|
-
}
|
|
36988
|
+
}
|
|
36989
|
+
|
|
36959
36990
|
}
|
|
36960
36991
|
if (resize) {
|
|
36961
36992
|
that.resizeHandle.on("pressup", function() {
|
|
@@ -37157,7 +37188,7 @@ NOTE: as of ZIM 5.5.0 the zim namespace is no longer required (unless zns is set
|
|
|
37157
37188
|
|
|
37158
37189
|
EXAMPLE
|
|
37159
37190
|
// slice a pic in four at 25% from the edges, scale the middle and keep the sides and corners not scaled.
|
|
37160
|
-
const pic = new Pic("
|
|
37191
|
+
const pic = new Pic("pic.png"); // preload this in Frame() or loadAssets()
|
|
37161
37192
|
const slicer = new Slicer({
|
|
37162
37193
|
obj:pic.clone(), // slicer will adjust obj so clone the pic so can use it unaffected later
|
|
37163
37194
|
scale:.5,
|
|
@@ -47360,6 +47391,7 @@ value - get or set the text content of the TextArea
|
|
|
47360
47391
|
text - get or set the text value
|
|
47361
47392
|
focus - get or set if the TextArea tag has focus or use setFocus() to set (might need timeout 100ms before setting)
|
|
47362
47393
|
readOnly - set to true to not be able to edit or to false to be able to edit (always can select)
|
|
47394
|
+
set enabled to false to disable selection
|
|
47363
47395
|
maxLength - get or set the maximum number of characters typed - will not truncate existing characters until typed
|
|
47364
47396
|
tag - the HTML textarea tag - just a regular HMTL form tag which can be styled
|
|
47365
47397
|
background - access to the Rectangle() used for the background
|
|
@@ -47368,6 +47400,8 @@ background - access to the Rectangle() used for the background
|
|
|
47368
47400
|
blendMode - how the object blends with what is underneath - such as "difference", "multiply", etc. same as CreateJS compositeOperation
|
|
47369
47401
|
keyFocus - get or set the keyboard focus on the component - see also zim.KEYFOCUS
|
|
47370
47402
|
will be set to true if this component is the first made or component is the last to be used
|
|
47403
|
+
enabled - get or set enabled of TextArea
|
|
47404
|
+
this will remember last readOnly so any setting of readonly in between enabled settings will have to be reapplied.
|
|
47371
47405
|
frame - get or set the frame - set this if changing frames
|
|
47372
47406
|
|
|
47373
47407
|
ALSO: see ZIM Container for properties such as:
|
|
@@ -47679,6 +47713,30 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
47679
47713
|
}
|
|
47680
47714
|
}
|
|
47681
47715
|
});
|
|
47716
|
+
|
|
47717
|
+
that._enabled = true;
|
|
47718
|
+
var lastReadOnly = that.readOnly;
|
|
47719
|
+
Object.defineProperty(that, 'enabled', {
|
|
47720
|
+
get: function() {
|
|
47721
|
+
zog("here")
|
|
47722
|
+
return that._enabled;
|
|
47723
|
+
},
|
|
47724
|
+
set: function(value) {
|
|
47725
|
+
if (!value) {
|
|
47726
|
+
lastReadOnly = that.readOnly;
|
|
47727
|
+
that.readOnly = false; // needed to remove selection
|
|
47728
|
+
that.focus = false;
|
|
47729
|
+
that.tag.style.pointerEvents = "none";
|
|
47730
|
+
setTimeout(function() {
|
|
47731
|
+
that.readOnly = true;
|
|
47732
|
+
},50); // setting readonly brings back selection even after blur - bug in HTML
|
|
47733
|
+
} else {
|
|
47734
|
+
that.tag.style.pointerEvents = "unset"; // tried all, unset, inherent, auto, initial, revert
|
|
47735
|
+
that.readOnly = lastReadOnly; // does not bring selection back
|
|
47736
|
+
}
|
|
47737
|
+
zenable(that, value);
|
|
47738
|
+
}
|
|
47739
|
+
});
|
|
47682
47740
|
|
|
47683
47741
|
this.resizeEvent = frame.on("resize", that.resize);
|
|
47684
47742
|
this.updateEvent = frame.on("update", that.resize);
|
|
@@ -51122,7 +51180,7 @@ RETURNS obj for chaining
|
|
|
51122
51180
|
|
|
51123
51181
|
if (e.stageX == null) return; // added for TextureActive drag in 2D view
|
|
51124
51182
|
|
|
51125
|
-
if (slide) {
|
|
51183
|
+
if (slide) {
|
|
51126
51184
|
dragObject.dispatchEvent("slidestart");
|
|
51127
51185
|
|
|
51128
51186
|
if (dragObject.parent) {
|
|
@@ -51164,6 +51222,12 @@ RETURNS obj for chaining
|
|
|
51164
51222
|
lastBackT = upT = 0;
|
|
51165
51223
|
}
|
|
51166
51224
|
|
|
51225
|
+
if (Math.abs(dX) < 1 && Math.abs(dY) < 1) {
|
|
51226
|
+
hasMoved = false;
|
|
51227
|
+
dragObject.dispatchEvent("slidestop");
|
|
51228
|
+
zim.Ticker.remove(obj.zimDragTicker);
|
|
51229
|
+
}
|
|
51230
|
+
|
|
51167
51231
|
// if (dampX) dampX.immediate(50);
|
|
51168
51232
|
// if (dampY) dampY.immediate(0);
|
|
51169
51233
|
|
|
@@ -51214,6 +51278,8 @@ RETURNS obj for chaining
|
|
|
51214
51278
|
target.addAt(placeObject, target.dropReticleIndex);
|
|
51215
51279
|
|
|
51216
51280
|
target.dropItem = dragObject;
|
|
51281
|
+
dragObject.droppedTarget = target;
|
|
51282
|
+
dragObject.dropTarget = target;
|
|
51217
51283
|
target.dropList = target;
|
|
51218
51284
|
target.dropNewIndex = target.dropReticleIndex;
|
|
51219
51285
|
target.dropReticleIndex = null;
|
|
@@ -51238,11 +51304,13 @@ RETURNS obj for chaining
|
|
|
51238
51304
|
else placeObject.mouse();
|
|
51239
51305
|
if (dropFull) target.dropFull = true;
|
|
51240
51306
|
placeObject.droppedTarget = target;
|
|
51307
|
+
placeObject.dropTarget = target;
|
|
51241
51308
|
return false;
|
|
51242
51309
|
}
|
|
51243
51310
|
}
|
|
51244
51311
|
});
|
|
51245
|
-
if (miss) {
|
|
51312
|
+
if (miss) {
|
|
51313
|
+
dragObject.dropTarget = dragObject.droppedTarget = null;
|
|
51246
51314
|
if (dropBack) {
|
|
51247
51315
|
dragObject.animate({
|
|
51248
51316
|
props:{x:dragObject.dropStartX, y:dragObject.dropStartY, scale:dragObject.dropStartS},
|
|
@@ -51351,7 +51419,7 @@ RETURNS obj for chaining
|
|
|
51351
51419
|
o.y = desiredY;
|
|
51352
51420
|
o.slideStartX = null;
|
|
51353
51421
|
o.slideStartY = null;
|
|
51354
|
-
if (hasMoved) {
|
|
51422
|
+
if (hasMoved) {
|
|
51355
51423
|
o.dispatchEvent("slidestop");
|
|
51356
51424
|
zim.Ticker.remove(obj.zimDragTicker);
|
|
51357
51425
|
}
|
|
@@ -51376,7 +51444,7 @@ RETURNS obj for chaining
|
|
|
51376
51444
|
function setUpSlide() {
|
|
51377
51445
|
obj.zimDragTicker = function() {
|
|
51378
51446
|
if (zot(obj.slideStartX)) return; // don't stop other things like window scrollbar from moving object
|
|
51379
|
-
|
|
51447
|
+
|
|
51380
51448
|
if (!dragObject) dragObject = obj; // could be risky if intending to drag children
|
|
51381
51449
|
if (obj.downCheck) {
|
|
51382
51450
|
var point;
|
|
@@ -53912,7 +53980,7 @@ Dynamically changes or adds a boundary rectangle to the object being dragged wit
|
|
|
53912
53980
|
|
|
53913
53981
|
EXAMPLE
|
|
53914
53982
|
const boundary = new Boundary(100,100,500,400); // x,y,w,h
|
|
53915
|
-
|
|
53983
|
+
new Circle().center().gestureBoundary(boundary);
|
|
53916
53984
|
END EXAMPLE
|
|
53917
53985
|
|
|
53918
53986
|
PARAMETERS
|
|
@@ -58063,7 +58131,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
58063
58131
|
// if (internal) target.percentComplete = target.pathRatio = 0;
|
|
58064
58132
|
|
|
58065
58133
|
if (zot(command)) command = true;
|
|
58066
|
-
if (target.pan == undefined) {
|
|
58134
|
+
if (target.pan == undefined && target.type != "Timer") { // hmmm what about other objects with paused properties...
|
|
58067
58135
|
if (target.type != undefined) target.paused = true;
|
|
58068
58136
|
target.animating = false;
|
|
58069
58137
|
}
|
|
@@ -79152,7 +79220,6 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
79152
79220
|
}
|
|
79153
79221
|
});
|
|
79154
79222
|
}
|
|
79155
|
-
|
|
79156
79223
|
if (
|
|
79157
79224
|
cache &&
|
|
79158
79225
|
!particle.emitShape &&
|
|
@@ -79264,7 +79331,7 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
79264
79331
|
else max = zik(life);
|
|
79265
79332
|
var min;
|
|
79266
79333
|
if (interval.min) min = interval.min;
|
|
79267
|
-
else if (Array.isArray(interval)) min = zim.
|
|
79334
|
+
else if (Array.isArray(interval)) min = zim.arrayMinMax(interval).min;
|
|
79268
79335
|
else min = zik(interval);
|
|
79269
79336
|
warm = Math.min(200, Math.round(max/min));
|
|
79270
79337
|
}
|
|
@@ -79509,6 +79576,7 @@ zim.Emitter = function(obj, width, height, interval, num, life, fade, shrink, wa
|
|
|
79509
79576
|
return that.cloneProps(new zim.Emitter(objClone, width, height, that.interval, that.num, that.life, that.fade, that.shrink, warm, that.decayTime, that.decayStart, that.trace, that.traceFadeTime, that.traceShiftX, that.traceShiftY, that.angle, that.emitterForce, that.gravity, that.wind, that.layers, that.animation, zim.copy(that.random), that.horizontal, that.vertical, that.sink, that.sinkForce, cache, that.events, startPaused, that.pool, that.poolMin, particles, focusWarm, style, that.group, inherit));
|
|
79510
79577
|
};
|
|
79511
79578
|
|
|
79579
|
+
|
|
79512
79580
|
this.dispose = function() {
|
|
79513
79581
|
if (that.zimInterval) that.zimInterval.clear();
|
|
79514
79582
|
if (emitterTicker) {
|
|
@@ -93299,9 +93367,11 @@ Or, the Three class can be used to help show ZIM in threejs
|
|
|
93299
93367
|
as an interactive and animated canavs texture.
|
|
93300
93368
|
See also TextureActive and TextureActives in the main ZIM docs.
|
|
93301
93369
|
|
|
93370
|
+
See: https://zimjs.com/three - for the mini-site with three.js
|
|
93371
|
+
|
|
93302
93372
|
three.js examples - with three.js inside ZIM
|
|
93303
93373
|
https://zimjs.com/bits/view/three.html
|
|
93304
|
-
https://zimjs.com/three/
|
|
93374
|
+
https://zimjs.com/capture/three/
|
|
93305
93375
|
https://codepen.io/zimjs/pen/abzXeZX
|
|
93306
93376
|
https://codepen.io/zimjs/pen/qGPVqO
|
|
93307
93377
|
|