zimjs 18.2.4 → 18.2.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/zim.js +18 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zimjs",
3
- "version": "18.2.4",
3
+ "version": "18.2.5",
4
4
  "type": "module",
5
5
  "main": "./src/zim.js",
6
6
  "types": "./ts-src/typings/zim",
package/src/zim.js CHANGED
@@ -9317,6 +9317,7 @@ Used internally by ZIM to globally dispose common connections
9317
9317
  if (c.getContext) c.getContext("2d").clearRect(0,0,1,1);
9318
9318
  delete obj.z_bc;
9319
9319
  }
9320
+ if (obj.cacheCanvas) obj.uncache();
9320
9321
  if (zim.KEYFOCUS == obj) zim.KEYFOCUS = null;
9321
9322
  if (WW.KEYFOCUS == obj) WW.KEYFOCUS = null;
9322
9323
  if (obj.veeObj) obj.veeObj = null;
@@ -52042,7 +52043,7 @@ END EXAMPLE
52042
52043
 
52043
52044
  PARAMETERS supports DUO - parameters or single object with properties below
52044
52045
  boundary - (default null) a ZIM Boundary object for the drag boundary
52045
- or a ZIM DisplayObject including stage
52046
+ or a ZIM DisplayObject including stage
52046
52047
  If the boundary is a display object then ZIM will keep the shape of the dragged object inside the bounds.
52047
52048
  If the boundary object is a Blob then the dragged object will stay within the Blob (experimental).
52048
52049
  If the boundary object is a Circle then the registration point of the dragged object will stay within the circle
@@ -52088,7 +52089,7 @@ rect - (depreciated) same as boundary - kept for backwards compatibility when us
52088
52089
  currentTarget - (default false) same as the all parameter - kept for backwards compatibility when using config object
52089
52090
  offStage - (default false) set to true to be able to drag object off stage (thanks Shammi!)
52090
52091
  immediateBoundary - (default false) set to true to add bounds immediately when drag() is set on a Container.
52091
- this is normally set to false for a .05 second delay to allow objects to be added to Container before setting bounds.
52092
+ this is normally set to false for a .05 second delay to allow objects to be added to Container before setting bounds.
52092
52093
  singleTouch - (default false) set to true to let only one touch operate the drag
52093
52094
  also see Frame() singleTouch setting - but setting on drag will only affect that object's drag
52094
52095
  dropTargets - an object or an array of objects that can receive a drop
@@ -52672,7 +52673,7 @@ RETURNS obj for chaining
52672
52673
  // if (dampY) dampY.immediate(0);
52673
52674
 
52674
52675
  } else {
52675
- obj.downCheck = false; // added ZIM NFT 01
52676
+ obj.downCheck = false; // added ZIM NFT 01
52676
52677
  var pointerCount = 0;
52677
52678
  for (var o in obj.pointers) {
52678
52679
  pointerCount++;
@@ -56881,7 +56882,12 @@ PARAMETERS
56881
56882
  ** supports DUO - parameters or single object with properties below
56882
56883
  ** supports VEE - parameters marked with ZIM VEE mean a zim Pick() object or Pick Literal can be passed
56883
56884
  Pick Literal formats: [1,3,2] - random; {min:10, max:20} - range; series(1,2,3) - order, function(){return result;} - function
56884
-
56885
+ ** supports OCT - parameter defaults can be set with STYLE control (like CSS)
56886
+ NOTE: can target parameters in general like
56887
+ STYLE = {loop:true};
56888
+ to target animate specifically use
56889
+ STYLE = {Animate:{loop:true}};
56890
+ NOT STYLE = {animate:{loop:true}} as lowercase animate conflicts with setting a animate convenience style
56885
56891
  props - the object literal holding properties and values to animate
56886
56892
  Basic examples: {x:200} or {rotation:360, alpha:0} or {scale:4} or {x:300, y:300, scale:"2"} (relative scale)
56887
56893
  There are custom options below including Convenience, ZIM VEE, Relative, and Series properties.
@@ -57253,6 +57259,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
57253
57259
  if (target && target.type && target.type=="AC" && WW.zdf) {WW.zdf.ac("animate", arguments); return target;}
57254
57260
  if (!zim.animateCheck) {z_d("45"); zim.animateCheck=true;}
57255
57261
 
57262
+
57256
57263
  if (!target) target = {}; // ZIM 018 replacing: return; from 10.9.0
57257
57264
  var AN = zim.ANIMATE;
57258
57265
  if (WW.ANIMATE != null) AN = WW.ANIMATE;
@@ -57512,7 +57519,7 @@ RETURNS the target for chaining (or null if no target is provided and run on zim
57512
57519
  // ANIMATION SERIES HANDLING
57513
57520
  // if an array is passed in to animate() as the obj
57514
57521
  // then animate treats this as an animation series
57515
- // [{target:circle, obj:{alpha:0}, time:1}, {target:rect, obj:{alpha:0}, time:1},]
57522
+ // [{target:circle, obj:{alpha:0}, time:1}, {target:rect, obj:{alpha:0}, time:1}]
57516
57523
 
57517
57524
  if (obj instanceof Array) {
57518
57525
  currentCount = 1;
@@ -61710,9 +61717,9 @@ zim constant and static Class
61710
61717
  Also GLOBALSTYLE zim constant
61711
61718
 
61712
61719
  DESCRIPTION
61713
- STYLE can be used to set any parameter on a DisplayObject and many of the Controls.
61714
- For instance: Circle, Blob, Button, Pane, Bitmap, Sprite, Tile, Pen, Emitter, Scroller, etc.
61715
- These are applied at the time the objects are made.
61720
+ STYLE can be used to set any parameter on a DisplayObject, many of the Controls, and some methods.
61721
+ For instance: Circle, Blob, Button, Pane, Bitmap, Sprite, Tile, Pen, Emitter, Scroller, drag, animate, etc.
61722
+ These are applied at the time the objects are made or method called.
61716
61723
  They are cascading with each level overriding the previous level:
61717
61724
 
61718
61725
  1. GENERAL: any style can be specified in general
@@ -61749,6 +61756,9 @@ STYLE = {big:{width:500}} // will be automatically converted to STYLE = {group:{
61749
61756
  NOTE: As of ZIM 016, group styles for an object will be used even if style for the object is set to false
61750
61757
  this will ignore all styles except those made by a group
61751
61758
 
61759
+ NOTE: As of ZIM 019, animate() and drag() can be styled.
61760
+ If the object type is used to target these, use Animate and Drag to avoid conflicting with convenience styles of animate and drag
61761
+
61752
61762
  EXAMPLE
61753
61763
  STYLE = {
61754
61764
  corner:20,