zimjs 19.0.7 → 19.0.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/package.json +1 -1
- package/src/zim.js +38 -11
- package/ts-src/typings/zim/index.d.ts +3 -3
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -28529,6 +28529,8 @@ content - (default " ") optional content to be centered in one of three formats:
|
|
|
28529
28529
|
spacingV - vertical space between the content areas
|
|
28530
28530
|
align - default CENTER, or use LEFT or RIGHT
|
|
28531
28531
|
backgroundColor - (default white) a css color for the background of the Pane
|
|
28532
|
+
to set the backgroundColor after the Pane is made, use the backing property
|
|
28533
|
+
pane.backing.backgroundColor = red;
|
|
28532
28534
|
color - (default black) a css color for the text color of the Pane
|
|
28533
28535
|
width - (default AUTO) width of pane - AUTO will matches content width - see also autoPadding and autoPaddingH
|
|
28534
28536
|
height - (default AUTO) height of pane - AUTO will matches content width - see also autoPadding and autoPaddingV
|
|
@@ -28608,6 +28610,8 @@ type - holds the class name as a String
|
|
|
28608
28610
|
closeCall - a function to call when the pane closes (see also call parameter of show method)
|
|
28609
28611
|
closeParams - an object to pass to the closeCall (see also params parameter of show method)
|
|
28610
28612
|
backing - or display - reference to the pane box
|
|
28613
|
+
use this to set the color, border, etc. afterwards
|
|
28614
|
+
pane.backing.color = red;
|
|
28611
28615
|
contentContainer - ZIM Container used to hold added content (formerly the content property)
|
|
28612
28616
|
use the add() method or add directly to the contentContainer property of the pane
|
|
28613
28617
|
content - gives access to the content provided as a parameter to the Pane()
|
|
@@ -67872,8 +67876,7 @@ setSpacing(h,v) - set spacings for Tile - h and v are horizontal and vertical sp
|
|
|
67872
67876
|
ZIM Tile() makes spacing arrays for horizontal and vertical spacing based on ZIM VEE calculations from the spacingH and spacingV parameters
|
|
67873
67877
|
to change spacing afterwards, new arrays can be provided to setSpacing()
|
|
67874
67878
|
the arrays must have col-1 and row-1 items - although h or v can be left null or undefined to keep existing spacing
|
|
67875
|
-
remake(items, newSpacingH, newSpacingV, newCount) - pass in an array of items to tile - see items property for editing current list - returns tile for chaining
|
|
67876
|
-
can also change rows and cols and remake()
|
|
67879
|
+
remake(items, newSpacingH, newSpacingV, newCount, newCols, newRows) - pass in an array of items to tile - see items property for editing current list - returns tile for chaining
|
|
67877
67880
|
optionally pass in new spacing parameters (these accept ZIM VEE values) and/or a newCount
|
|
67878
67881
|
Note: if the items length is different than the previous items length then the count will be automatically made cols*rows - unless newCount is provided
|
|
67879
67882
|
resize(width, height) - resize the tile with new width and/or height if the width and/or height parameters were set - returns tile for chaining
|
|
@@ -67913,8 +67916,7 @@ These properties can be changed by calling remake()
|
|
|
67913
67916
|
items - an array of items the tile uses
|
|
67914
67917
|
modify this and pass in to remake(items) to update the Tile with new items
|
|
67915
67918
|
cannot modify count - count will become the length of the array passed to remake()
|
|
67916
|
-
cols
|
|
67917
|
-
rows - number of rows - can modify - need to call remake() to see changes
|
|
67919
|
+
cols / rows - (read only) use newCols and newRows parameter of remake()
|
|
67918
67920
|
These properties can be changed by calling resize(width, height) - set width or height to 0 for no spreading
|
|
67919
67921
|
squeezeH - horizontal compression - can modify - need to call resize() to see changes
|
|
67920
67922
|
squeezeV - vertical compression - can modify - need to call resize() to see changes
|
|
@@ -67979,6 +67981,11 @@ note: the item is not the event object target - as that is the tile
|
|
|
67979
67981
|
if (zot(count)) count = DS.count!=null?DS.count:(unique&&Array.isArray(obj))?obj.length:null;
|
|
67980
67982
|
if (count === 0) {count = null; if (zon) {zogy("ZIM Tile() - count parameter of 0 is ignored - see docs");}}
|
|
67981
67983
|
|
|
67984
|
+
// Added ZIM 019 Patch
|
|
67985
|
+
|
|
67986
|
+
var colsO = cols;
|
|
67987
|
+
var rowsO = rows;
|
|
67988
|
+
|
|
67982
67989
|
// Added ZIM 018
|
|
67983
67990
|
|
|
67984
67991
|
var spacingHList = [];
|
|
@@ -68461,14 +68468,32 @@ note: the item is not the event object target - as that is the tile
|
|
|
68461
68468
|
return that.items2D[ro][co];
|
|
68462
68469
|
};
|
|
68463
68470
|
|
|
68464
|
-
this.remake = function(items, newSpacingH, newSpacingV, newCount) {
|
|
68471
|
+
this.remake = function(items, newSpacingH, newSpacingV, newCount, newCols, newRows) {
|
|
68465
68472
|
|
|
68466
68473
|
// a little complicated so we just remake the spacings if provided or items length has gotten bigger
|
|
68467
68474
|
// if items length is different we create a new count - can override with newCount
|
|
68468
68475
|
if (zot(items)) items = that.items
|
|
68469
68476
|
if (zot(newCount) && items.length != that.items.length) count = that.cols*that.rows;
|
|
68470
|
-
if (
|
|
68477
|
+
if (
|
|
68478
|
+
!zot(newSpacingH) ||
|
|
68479
|
+
!zot(newSpacingV) ||
|
|
68480
|
+
items.length > that.items.length ||
|
|
68481
|
+
(!zot(newCols) && newCols != that.cols) ||
|
|
68482
|
+
(!zot(newRows) && newRows != that.rows)
|
|
68483
|
+
) {
|
|
68471
68484
|
|
|
68485
|
+
if (!zot(newCols)) colsO = newCols;
|
|
68486
|
+
if (!zot(newRows)) rowsO = newRows;
|
|
68487
|
+
if (colsO <= 0) colsO = 1;
|
|
68488
|
+
if (rowsO <= 0) rowsO = 1;
|
|
68489
|
+
|
|
68490
|
+
if (!zot(newCount)) count = newCount
|
|
68491
|
+
else count = items.length;
|
|
68492
|
+
|
|
68493
|
+
if (count > colsO) that.cols = colsO;
|
|
68494
|
+
else that.cols = count;
|
|
68495
|
+
that.rows = Math.ceil(count/that.cols);
|
|
68496
|
+
|
|
68472
68497
|
if (!zot(newSpacingH)) spacingH = newSpacingH;
|
|
68473
68498
|
if (!zot(newSpacingV)) spacingV = newSpacingV;
|
|
68474
68499
|
|
|
@@ -68667,7 +68692,7 @@ note: the item is not the event object target - as that is the tile
|
|
|
68667
68692
|
if (!resize && backing) backings = [];
|
|
68668
68693
|
|
|
68669
68694
|
var lastX = (colSize?(spacingHOList[0]?spacingHOList[0]:0):0)/2;
|
|
68670
|
-
var lastY = (rowSize?(
|
|
68695
|
+
var lastY = (rowSize?(spacingVOList[0]?spacingVOList[0]:0):0)/2; // updated to VO from HO - ZIM 019 patch
|
|
68671
68696
|
|
|
68672
68697
|
var rect;
|
|
68673
68698
|
var cou = 0;
|
|
@@ -90766,9 +90791,9 @@ leftMouseDown - read only value as to whether the left mouse button is down
|
|
|
90766
90791
|
mousedownEvent - a reference to the frame "stagemousedown" event - can set F.off("stagemousedown", F.mousedownEvent)
|
|
90767
90792
|
mousemoveEvent - a reference to the frame "stagemousemove" event - can set F.off("stagemousemove", F.mousemoveEvent)
|
|
90768
90793
|
orientation - VERTICAL or HORIZONTAL (updated live with orientation change)
|
|
90769
|
-
visibleLeft, visibleTop, visibleRight, visibleBottom - in
|
|
90794
|
+
visibleLeft, visibleTop, visibleRight, visibleBottom - in FILL scale mode these give window edge locations relative to the stage
|
|
90770
90795
|
can be used to position items like navigation relative to window as the frame resize event is fired
|
|
90771
|
-
in all scale modes other than
|
|
90796
|
+
in all scale modes other than FILL, the values are 0, W, 0, H
|
|
90772
90797
|
zil - reference to zil events that stop canvas from shifting or scrolling - also see allowDefault parameter
|
|
90773
90798
|
can set allowDefault property to false then allow specific defaults by removing zil events - see zil global function
|
|
90774
90799
|
example: window.removeEventListener("keydown", F.zil[0]); removes keydown preventions (for page up, page down, home, end, etc)
|
|
@@ -90778,10 +90803,10 @@ touch - get or set the touch setting - setting to false will not allow touch on
|
|
|
90778
90803
|
singleTouch - get or set the singleTouch setting - set to true to turn on single touch and false to turn on multitouch
|
|
90779
90804
|
setting either true or false will set the touch property to true
|
|
90780
90805
|
also see the touch and singleTouch parameters and touch property
|
|
90781
|
-
followBoundary - update with a ZIM Boundary for follow() if
|
|
90806
|
+
followBoundary - update with a ZIM Boundary for follow() if FULL mode Frame "resize" event happens, etc.
|
|
90782
90807
|
altKey - true if the alt key is being pressed otherwise false
|
|
90783
90808
|
ctrlKey - true if the ctrl key is being pressed otherwise false
|
|
90784
|
-
metaKey - true if the meta key (
|
|
90809
|
+
metaKey - true if the meta key (command on Mac or windows key) is being pressed otherwise false
|
|
90785
90810
|
shiftKey - true if the shift key is being pressed otherwise false
|
|
90786
90811
|
loadFailObj - the object that shows if images are broken - will be given a type property of "EmptyAsset"
|
|
90787
90812
|
startTime - datestamp of when frame was made - used internally
|
|
@@ -102619,6 +102644,8 @@ spacingH - (default 0) a spacing between columns
|
|
|
102619
102644
|
spacingV - (default 0) a spacing between rows
|
|
102620
102645
|
interval - (default 0) the time to animate in s
|
|
102621
102646
|
for pixels, noise, dots and bling this is the time between showing different patterns
|
|
102647
|
+
Note: if using a series() for color, this will only animate if the total number of cols x rows
|
|
102648
|
+
is NOT divisable equally by the number of colors in the series
|
|
102622
102649
|
for stripes, slants, hatch, plaid this is the time to move the pattern to the right
|
|
102623
102650
|
different patterns may seem to move at different speeds due to the pattern repeat distance
|
|
102624
102651
|
startPaused - (default false) set to true to start the interval for animation to paused
|
|
@@ -3380,7 +3380,7 @@ declare namespace zim {
|
|
|
3380
3380
|
export class Tile extends Container {
|
|
3381
3381
|
constructor(config_or_obj: DisplayObject | zimVee, cols?: number, rows?: number, spacingH?: number, spacingV?: number, unique?: boolean, width?: number, height?: number, squeezeH?: boolean, squeezeV?: boolean, colSize?: number | zimVee, rowSize?: number | zimVee, align?: string | zimVee, valign?: string | zimVee, count?: number, mirrorH?: boolean, mirrorV?: boolean, snapToPixel?: boolean, clone?: boolean, events?: boolean, exact?: boolean, scaleToH?: number | zimVee, scaleToV?: number | zimVee, scaleToType?: string | zimVee, backgroundColor?: color | zimVee, backing?: DisplayObject | zimVee, backdropColor?: color | zimVee, backdropPadding?: number, backdropPaddingH?: number, backdropPaddingV?: number, mat?: DisplayObject, style?: boolean, group?: string, inherit?: {})
|
|
3382
3382
|
constructor(config: { obj: DisplayObject | zimVee, cols?: number, rows?: number, spacingH?: number, spacingV?: number, unique?: boolean, width?: number, height?: number, squeezeH?: boolean, squeezeV?: boolean, colSize?: number | zimVee, rowSize?: number | zimVee, align?: string | zimVee, valign?: string | zimVee, count?: number, mirrorH?: boolean, mirrorV?: boolean, snapToPixel?: boolean, clone?: boolean, events?: boolean, exact?: boolean, scaleToH?: number | zimVee, scaleToV?: number | zimVee, scaleToType?: string | zimVee, backgroundColor?: color | zimVee, backing?: DisplayObject | zimVee, backdropColor?: color | zimVee, backdropPadding?: number, backdropPaddingH?: number, backdropPaddingV?: number, mat?: DisplayObject, style?: boolean, group?: string, inherit?: {} })
|
|
3383
|
-
remake(items?: any[]): this
|
|
3383
|
+
remake(items?: any[], newSpacingH?: number, newSpacingV?: number, newCount?: number, newCols?: number, newRows?: number): this
|
|
3384
3384
|
resize(width?: number, height?: number): this
|
|
3385
3385
|
setProps(obj: [], props: {}): this
|
|
3386
3386
|
itemUnderPoint(x: number, y: number, ignoreSpacing?: boolean): DisplayObject
|
|
@@ -3391,8 +3391,8 @@ declare namespace zim {
|
|
|
3391
3391
|
readonly current: any[]
|
|
3392
3392
|
readonly current2D: any[]
|
|
3393
3393
|
readonly current2DCols: any[]
|
|
3394
|
-
cols: number
|
|
3395
|
-
rows: number
|
|
3394
|
+
readonly cols: number
|
|
3395
|
+
readonly rows: number
|
|
3396
3396
|
spacingH: number
|
|
3397
3397
|
spacingV: number
|
|
3398
3398
|
squeezeH: boolean
|