zimjs 16.4.2 → 16.4.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/package.json +1 -1
- package/src/zim.js +51 -15
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -30540,6 +30540,8 @@ zim.TextInput.LabelInput = function(text, size, maxLength, password, selectionCo
|
|
|
30540
30540
|
this.hiddenInput.style.width = "1px";
|
|
30541
30541
|
this.hiddenInput.style.height = "1px";
|
|
30542
30542
|
this.hiddenInput.style.fontSize = "1px";
|
|
30543
|
+
|
|
30544
|
+
// this.hiddenInput.style.direction = rtl?"rtl":"ltr";
|
|
30543
30545
|
|
|
30544
30546
|
this.onFocus = function() {
|
|
30545
30547
|
if (this.stage) frame = this.stage.frame;
|
|
@@ -32591,6 +32593,13 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
32591
32593
|
}
|
|
32592
32594
|
next.y = height/2;
|
|
32593
32595
|
}
|
|
32596
|
+
|
|
32597
|
+
}
|
|
32598
|
+
|
|
32599
|
+
if (arrows && rightForward===false) {
|
|
32600
|
+
// zim.swapProperties("x", next, prev);
|
|
32601
|
+
// zim.swapProperties("y", next, prev);
|
|
32602
|
+
// zim.swapProperties("rotation", next, prev);
|
|
32594
32603
|
}
|
|
32595
32604
|
|
|
32596
32605
|
// pressdown and move mouse changes speed and direction of stepper
|
|
@@ -32941,16 +32950,30 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
32941
32950
|
arrowNext.color = arrowColor;
|
|
32942
32951
|
next.cur("pointer");
|
|
32943
32952
|
if (!continuous) {
|
|
32944
|
-
if (
|
|
32945
|
-
if (
|
|
32946
|
-
if (
|
|
32947
|
-
|
|
32948
|
-
|
|
32949
|
-
if (
|
|
32953
|
+
if (rightForward!==false) {
|
|
32954
|
+
if (stepperType == "number") {
|
|
32955
|
+
if (index == that.min) {
|
|
32956
|
+
if (numDir > 0) {greyPrev();} else {greyNext();}
|
|
32957
|
+
}
|
|
32958
|
+
if (index == that.max) {
|
|
32959
|
+
if (numDir > 0) {greyNext();} else {greyPrev();}
|
|
32960
|
+
}
|
|
32961
|
+
} else {
|
|
32962
|
+
if (index == 0) vertical?greyNext():greyPrev();
|
|
32963
|
+
if (index == list.length-1) vertical?greyPrev():greyNext();
|
|
32950
32964
|
}
|
|
32951
32965
|
} else {
|
|
32952
|
-
if (
|
|
32953
|
-
|
|
32966
|
+
if (stepperType == "number") {
|
|
32967
|
+
if (index == that.min) {
|
|
32968
|
+
if (numDir > 0) {greyNext();} else {greyPrev();}
|
|
32969
|
+
}
|
|
32970
|
+
if (index == that.max) {
|
|
32971
|
+
if (numDir > 0) {greyPrev();} else {greyNext();}
|
|
32972
|
+
}
|
|
32973
|
+
} else {
|
|
32974
|
+
if (index == 0) vertical?greyPrev():greyNext();
|
|
32975
|
+
if (index == list.length-1) vertical?greyNext():greyPrev();
|
|
32976
|
+
}
|
|
32954
32977
|
}
|
|
32955
32978
|
}
|
|
32956
32979
|
}
|
|
@@ -42296,7 +42319,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
42296
42319
|
draggable:true,
|
|
42297
42320
|
});
|
|
42298
42321
|
that.textArea = new zim.TextArea(Math.min(400, that.stage.width-70), Math.min(400, that.stage.height-70))
|
|
42299
|
-
|
|
42322
|
+
that.pane.add(that.textArea);
|
|
42300
42323
|
}
|
|
42301
42324
|
that.pane.show();
|
|
42302
42325
|
that.textArea.text = JSON.stringify(_steps);
|
|
@@ -52019,6 +52042,7 @@ sequence - (default 0) the delay time in seconds to run on children of a contain
|
|
|
52019
52042
|
If the loop prop is true then sequenceCall below would activate for each loop
|
|
52020
52043
|
For an array, you must use the zim function with a target parameter - otherwise you can use the ZIM 4TH method
|
|
52021
52044
|
Note: a sequence cannot be seriesed and a series cannot be sequenced
|
|
52045
|
+
Note: for a sequence animate() give the animate() an id and pauseAnimate() or stopAnimate() that id.
|
|
52022
52046
|
sequenceCall - (default null) the function that will be called for each sequence animation
|
|
52023
52047
|
Note: the value of the sequenceCall parameter will be the object that just ended animation unless there is a sequenceParams value
|
|
52024
52048
|
sequenceParams - (default null) a parameter sent to the sequenceCall function
|
|
@@ -52134,6 +52158,7 @@ PROPERTIES - zim.animate() adds the following properties to any object it animat
|
|
|
52134
52158
|
even if other animations are still running.
|
|
52135
52159
|
Pausing multiple objects should work fine.
|
|
52136
52160
|
See the tweenState property to test which ids are animating or paused
|
|
52161
|
+
For a sequence animate() give the animate() an id and pauseAnimate() or stopAnimate() that id.
|
|
52137
52162
|
waiting - read-only - true when animation is waiting in wait, rewindWait, loopWait
|
|
52138
52163
|
tweenState - an object with tween ids as properties along with an all property (unless no tweens anymore)
|
|
52139
52164
|
these properties are true if animating and false if paused
|
|
@@ -53262,6 +53287,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
53262
53287
|
if (target.handlePath) target.handlePath();
|
|
53263
53288
|
}
|
|
53264
53289
|
|
|
53290
|
+
|
|
53265
53291
|
// PATH ANIMATION SETUP
|
|
53266
53292
|
var pathObject,newPoint,locPoint,segments;
|
|
53267
53293
|
if (!zot(obj.path) && obj.path.segmentPoints) {
|
|
@@ -53270,8 +53296,10 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
|
|
|
53270
53296
|
if (target.type == "Pen") target.infinite = true;
|
|
53271
53297
|
target.zimOnPath = true;
|
|
53272
53298
|
if (zot(target.pathRatio)) target.pathRatio = 0;
|
|
53273
|
-
if (obj.orient) {
|
|
53299
|
+
if (obj.orient===true) {
|
|
53274
53300
|
obj.orient = obj.path;
|
|
53301
|
+
}
|
|
53302
|
+
if (obj.orient) {
|
|
53275
53303
|
obj.startOrient = obj.rotation; // ?
|
|
53276
53304
|
}
|
|
53277
53305
|
pathObject = obj.path;
|
|
@@ -55011,6 +55039,8 @@ To stop a Shape tween, set an id in the animate call and use that id to stop the
|
|
|
55011
55039
|
this is because the shape tween animation is not on the shape but on its many control points
|
|
55012
55040
|
See also pauseAnimate()
|
|
55013
55041
|
|
|
55042
|
+
NOTE: for a sequence animate() give the animate() an id and pauseAnimate() or stopAnimate() that id.
|
|
55043
|
+
|
|
55014
55044
|
NOTE: formerly stopZimAnimate - which still works but is depreciated
|
|
55015
55045
|
|
|
55016
55046
|
NOTE: calling stopAnimate(id) stops tweens with this id on all objects
|
|
@@ -55098,6 +55128,8 @@ To pause a Shape tween, set an id in the animate call and use that id to pause t
|
|
|
55098
55128
|
this is because the shape tween animation is not on the shape but on its many control points
|
|
55099
55129
|
See also stopAnimate
|
|
55100
55130
|
|
|
55131
|
+
NOTE: for a sequence animate() give the animate() an id and pauseAnimate() or stopAnimate() that id.
|
|
55132
|
+
|
|
55101
55133
|
NOTE: formerly pauseZimAnimate - which still works but is depreciated
|
|
55102
55134
|
|
|
55103
55135
|
NOTE: calling pauseAnimate(true, id) pauses tweens with this id on all objects
|
|
@@ -67828,7 +67860,7 @@ fromIDs - an object of from() properties in the form {prop1:[id1, id2], prop2:[i
|
|
|
67828
67860
|
if (objs.length>0) {
|
|
67829
67861
|
zim.loop(objs, function (obj) {
|
|
67830
67862
|
ids = that.objIDs.at(obj);
|
|
67831
|
-
if (ids.length>0) {
|
|
67863
|
+
if (ids && ids.length>0) {
|
|
67832
67864
|
zim.loop(ids, function (id) {
|
|
67833
67865
|
clearID(id, false);
|
|
67834
67866
|
});
|
|
@@ -68212,7 +68244,7 @@ fromIDs - an object of from() properties in the form {prop1:[id1, id2], prop2:[i
|
|
|
68212
68244
|
};
|
|
68213
68245
|
|
|
68214
68246
|
this.clear = function() {
|
|
68215
|
-
if (that.bindType == zim.LOCALSTORAGE) localStorage
|
|
68247
|
+
if (that.bindType == zim.LOCALSTORAGE) localStorage.removeItem(that.connection);
|
|
68216
68248
|
return that;
|
|
68217
68249
|
};
|
|
68218
68250
|
|
|
@@ -72931,7 +72963,7 @@ EXAMPLE
|
|
|
72931
72963
|
STYLE = {borderColor:dark, borderWidth:2};
|
|
72932
72964
|
const front = F.makeIcon().sca(2.5);
|
|
72933
72965
|
const back = new Page(front.width, front.height, blue, green, 1);
|
|
72934
|
-
const Label("ZIM Flipper").center(back);
|
|
72966
|
+
const label = new Label("ZIM Flipper").center(back);
|
|
72935
72967
|
const card = new Flipper(front, back).center();
|
|
72936
72968
|
END EXAMPLE
|
|
72937
72969
|
|
|
@@ -73024,6 +73056,10 @@ ALSO: see the CreateJS Easel Docs for Container properties, such as:
|
|
|
73024
73056
|
x, y, rotation, scaleX, scaleY, regX, regY, skewX, skewY,
|
|
73025
73057
|
alpha, cursor, shadow, name, mouseChildren, mouseEnabled, parent, numChildren, etc.
|
|
73026
73058
|
|
|
73059
|
+
ACTIONEVENT
|
|
73060
|
+
This component is affected by the general ACTIONEVENT setting
|
|
73061
|
+
The default is "mousedown" - if set to something else the component will act on click (press)
|
|
73062
|
+
|
|
73027
73063
|
EVENTS
|
|
73028
73064
|
dispatches a "flip" event when the fipper starts the flip
|
|
73029
73065
|
dispatches a "flipped" event when the fipper ends the flip
|
|
@@ -73073,12 +73109,12 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
73073
73109
|
var obj;
|
|
73074
73110
|
if ((frontPress && !flipped) || (backPress && flipped)) {
|
|
73075
73111
|
obj = (interactive && front.backing)?front.backing:front;
|
|
73076
|
-
obj.on("mousedown", function() {spin(front,back);});
|
|
73112
|
+
obj.on((!zns?WW.ACTIONEVENT=="mousedown":zim.ACTIONEVENT=="mousedown")?"mousedown":"click", function() {spin(front,back);});
|
|
73077
73113
|
obj.cur();
|
|
73078
73114
|
}
|
|
73079
73115
|
if ((backPress && !flipped) || (frontPress && flipped)) {
|
|
73080
73116
|
obj = (interactive && back.backing)?back.backing:back;
|
|
73081
|
-
obj.on("mousedown", function() {spin(back,front,-1);});
|
|
73117
|
+
obj.on((!zns?WW.ACTIONEVENT=="mousedown":zim.ACTIONEVENT=="mousedown")?"mousedown":"click", function() {spin(back,front,-1);});
|
|
73082
73118
|
obj.cur();
|
|
73083
73119
|
}
|
|
73084
73120
|
front.oScale = front.scale;
|