zimjs 17.0.4 → 17.1.0
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 +528 -232
- package/ts-src/typings/zim/index.d.ts +5 -5
package/package.json
CHANGED
package/src/zim.js
CHANGED
|
@@ -10958,7 +10958,7 @@ group - (default null) set to String (or comma delimited String) so STYLE can se
|
|
|
10958
10958
|
inherit - (default null) used internally but can receive an {} of styles directly
|
|
10959
10959
|
|
|
10960
10960
|
METHODS
|
|
10961
|
-
run(time, label, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startFrame, endFrame, tweek, id, globalControl)
|
|
10961
|
+
run(time, label, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startFrame, endFrame, frame, tweek, id, globalControl)
|
|
10962
10962
|
The run() method animates the Sprite over an amount of time
|
|
10963
10963
|
Would recommend this method over the CreateJS play() and gotoAndPlay()
|
|
10964
10964
|
methods because the framerate for these get overwritten by other S.update() calls
|
|
@@ -10998,6 +10998,8 @@ run(time, label, call, params, wait, waitedCall, waitedParams, loop, loopCount,
|
|
|
10998
10998
|
note - this goes backwards - so "bounceOut" would happen at the end of the rewind
|
|
10999
10999
|
startFrame - (default null - or 0) the frame to start on - will be overridden by a label with frames
|
|
11000
11000
|
endFrame - (default null - or totalFrames) the frame to end on - will be overridden by a label with frames
|
|
11001
|
+
frame - (default null) set the single frame to run - will override startFrame and endFrame
|
|
11002
|
+
this is good for a TextureAtlas where you show one frame of the sprite as a picture
|
|
11001
11003
|
tweek - (default 1) a factor for extra time on rewind and loops if needed
|
|
11002
11004
|
id - (default randomly assigned) an id you can use in other animations - available as sprite.id
|
|
11003
11005
|
use this id in other animations for pauseRun and stopRun to act on these as well
|
|
@@ -11281,8 +11283,8 @@ animationend, change, added, click, dblclick, mousedown, mouseout, mouseover, pr
|
|
|
11281
11283
|
return framesNormalized;
|
|
11282
11284
|
};
|
|
11283
11285
|
|
|
11284
|
-
this.run = function(time, label, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startFrame, endFrame, tweek, id, globalControl, pauseOnBlur) {
|
|
11285
|
-
var sig = "time, label, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startFrame, endFrame, tweek, id, globalControl, pauseOnBlur";
|
|
11286
|
+
this.run = function(time, label, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startFrame, endFrame, frame, tweek, id, globalControl, pauseOnBlur) {
|
|
11287
|
+
var sig = "time, label, call, params, wait, waitedCall, waitedParams, loop, loopCount, loopWait, loopCall, loopParams, loopWaitCall, loopWaitParams, loopPick, rewind, rewindWait, rewindCall, rewindParams, rewindWaitCall, rewindWaitParams, rewindTime, rewindEase, startFrame, endFrame, frame, tweek, id, globalControl, pauseOnBlur";
|
|
11286
11288
|
var duo; if (duo = zob(that.run, arguments, sig)) return duo;
|
|
11287
11289
|
|
|
11288
11290
|
var timeType = getTIME();
|
|
@@ -11291,6 +11293,7 @@ animationend, change, added, click, dblclick, mousedown, mouseout, mouseover, pr
|
|
|
11291
11293
|
if (zot(tweek)) tweek = 1;
|
|
11292
11294
|
if (!zot(id)) that.id = id;
|
|
11293
11295
|
if (!zot(globalControl)) that.globalControl = globalControl;
|
|
11296
|
+
if (!zot(frame)) startFrame = endFrame = frame;
|
|
11294
11297
|
|
|
11295
11298
|
var extraTime;
|
|
11296
11299
|
if (Array.isArray(label)) {
|
|
@@ -28351,7 +28354,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
28351
28354
|
stage = that.stage;
|
|
28352
28355
|
content.loop(function(item) {
|
|
28353
28356
|
// ADJUSTED ZIM 016 - look into how we can optimize a wrapper and keep scrollbars the right size
|
|
28354
|
-
if (!item.hitTestBounds || !item.stage || item.type == "Wrapper") return; // don't turn off items if not on stage yet
|
|
28357
|
+
if (!item.hitTestBounds || !item.stage || item.type == "Wrapper" || item.type == "List") return; // don't turn off items if not on stage yet
|
|
28355
28358
|
if (item.hitTestBounds(that,300)) {
|
|
28356
28359
|
item.visible = true;
|
|
28357
28360
|
if (item.loop) item.loop(function(item2) {
|
|
@@ -30326,9 +30329,9 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
30326
30329
|
for (var i=0; i<num; i++) {
|
|
30327
30330
|
light = new Container(size,size).reg("center","center");
|
|
30328
30331
|
|
|
30329
|
-
//
|
|
30330
|
-
if (indicatorType == "dot") {
|
|
30331
|
-
light.dim = new zim.Circle(size/2, backgroundColor, borderColor, borderWidth, null, null, null, null, null, false);
|
|
30332
|
+
// dim
|
|
30333
|
+
if (indicatorType == "dot" || indicatorType == "circle") {
|
|
30334
|
+
light.dim = new zim.Circle(size/2, backgroundColor, borderColor, borderWidth, null, null, null, null, null, false);
|
|
30332
30335
|
} else if (indicatorType == "square" || indicatorType == "box") {
|
|
30333
30336
|
light.dim = new zim.Rectangle(size, size, backgroundColor, borderColor, borderWidth, null, null, null, null, false);
|
|
30334
30337
|
light.dim.regX = light.dim.width/2;
|
|
@@ -30351,7 +30354,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
30351
30354
|
this.lights.push(light);
|
|
30352
30355
|
|
|
30353
30356
|
// brights
|
|
30354
|
-
if (selectedIndicatorType == "dot") {
|
|
30357
|
+
if (selectedIndicatorType == "dot" || indicatorType == "circle") {
|
|
30355
30358
|
light.bright = new zim.Circle(size/2, foregroundColor, borderColor, borderWidth, null, null, null, null, null, false);
|
|
30356
30359
|
} else if (selectedIndicatorType == "square" || selectedIndicatorType == "box") {
|
|
30357
30360
|
light.bright = new zim.Rectangle(size, size, foregroundColor, borderColor, borderWidth, null, null, null, null, false);
|
|
@@ -31394,7 +31397,7 @@ zim.extend(zim.TextInput.LabelInput, zim.Label, "dispose", "zimLabel", false);
|
|
|
31394
31397
|
|
|
31395
31398
|
|
|
31396
31399
|
/*--
|
|
31397
|
-
zim.List = function(width, height, list, viewNum, vertical, currentSelected, align, valign, labelAlign, labelValign, labelIndent, labelIndentH, labelIndentV, indent, spacing, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, downColor, selectedColor, selectedRollColor, borderColor, borderWidth, padding, corner, swipe, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, scrollBarOverlay, slide, slideFactor, slideSnap, slideSnapDamp, shadowColor, shadowBlur, paddingH, paddingV, scrollWheel, damp, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, draggable, boundary, onTop, close, closeColor, collapse, collapseColor, collapsed, excludeCustomTap, organizer, checkBox, pulldown, clone, cancelCurrentDrag, index, noScale, pulldownToggle, optimize, keyEnabled, resizeHandle, resizeBoundary, resizeVisible, continuous, closeOthers, drop, dropTargets, dropColor, dropThickness, dropScrollSpeed, dropReticleAlpha, selectedIndex, style, group, inherit)
|
|
31400
|
+
zim.List = function(width, height, list, viewNum, vertical, currentSelected, align, valign, labelAlign, labelValign, labelIndent, labelIndentH, labelIndentV, indent, spacing, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, downColor, selectedColor, selectedRollColor, borderColor, borderWidth, padding, corner, swipe, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, scrollBarOverlay, slide, slideFactor, slideSnap, slideSnapDamp, shadowColor, shadowBlur, paddingH, paddingV, scrollWheel, damp, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, draggable, boundary, onTop, close, closeColor, collapse, collapseColor, collapsed, excludeCustomTap, organizer, checkBox, pulldown, clone, cancelCurrentDrag, index, noScale, pulldownToggle, optimize, keyEnabled, resizeHandle, resizeBoundary, resizeVisible, continuous, closeOthers, drop, dropTargets, dropSelf, dropCopy, dropColor, dropThickness, dropScrollSpeed, dropReticleAlpha, dropHitTest, dropFull, dropSnap, dropEnd, dropScale, dropWidth, dropHeight, selectedIndex, style, group, inherit)
|
|
31398
31401
|
|
|
31399
31402
|
List
|
|
31400
31403
|
zim class - extends a zim.Window which extends a zim.Container which extends a createjs.Container
|
|
@@ -31439,6 +31442,12 @@ Indent only works with custom items in the list in left, right alignment or top,
|
|
|
31439
31442
|
This moves the items away from their alignment
|
|
31440
31443
|
There is also label indenting for items with labels - and labelIndentV and labelIndentH
|
|
31441
31444
|
|
|
31445
|
+
DROP
|
|
31446
|
+
As if ZIM 017, drop parameters and properties have been added.
|
|
31447
|
+
These allow List items to be dragged and dropped within the same list or to other lists or to other objects.
|
|
31448
|
+
Objects not in lists can also be dragged into a list - see the drag() method's drop parameters.
|
|
31449
|
+
See https://zimjs.com/017/dropping.html
|
|
31450
|
+
|
|
31442
31451
|
NOTE: List can have a ZIM Organizer added with the organizer parameter
|
|
31443
31452
|
The organizer lets the user add, remove and move items up, down, to the top or the bottom
|
|
31444
31453
|
See: https://zimjs.com/docs.html?item=organizer
|
|
@@ -31463,7 +31472,6 @@ const list = new List({
|
|
|
31463
31472
|
list:["Enormous", "Big", "Medium", "Small", "Puny"],
|
|
31464
31473
|
viewNum:3, // this number will change the size of the list elements (default is 5)
|
|
31465
31474
|
}).center()
|
|
31466
|
-
S.update();
|
|
31467
31475
|
END EXAMPLE
|
|
31468
31476
|
|
|
31469
31477
|
EXAMPLE
|
|
@@ -31471,6 +31479,7 @@ EXAMPLE
|
|
|
31471
31479
|
// drop is set to true in the STYLE - this means the list can drop its items onto itself
|
|
31472
31480
|
// dropTargets is set after the lists are made - to be able to drop onto other lists
|
|
31473
31481
|
// these two things are separate - items can be dropped onto other lists but not their own, etc.
|
|
31482
|
+
// also see https://zimjs.com/017/dropping.html for dropping to and from outside a list
|
|
31474
31483
|
|
|
31475
31484
|
const w = 60;
|
|
31476
31485
|
const h = 60;
|
|
@@ -31681,10 +31690,10 @@ titleBarHeight - (default fit label) the height of the titleBar if a titleBar is
|
|
|
31681
31690
|
draggable - (default true if titleBar) set to false to not allow dragging titleBar to drag list
|
|
31682
31691
|
boundary - (default null) set to ZIM Boundary() object - or CreateJS.rectangle()
|
|
31683
31692
|
onTop - (default true) set to false to not bring list to top of container when dragging
|
|
31684
|
-
close - (default false)
|
|
31685
|
-
closeColor - (default grey)
|
|
31686
|
-
collapse - (default false)
|
|
31687
|
-
collapseColor - (default grey)
|
|
31693
|
+
close - (default false) a close X for the top right corner that closes the list when pressed
|
|
31694
|
+
closeColor - (default grey) the color of the close X if close is requested
|
|
31695
|
+
collapse - (default false) set to true to add a collapse button to the titleBar that reduces the list so only the bar shows and adds a button to expand
|
|
31696
|
+
collapseColor - (default grey) the color of the collapse icon
|
|
31688
31697
|
collapsed - (default false) set to true to start the list collapsed
|
|
31689
31698
|
excludeCustomTap - (default false) set to true to exclude custom buttons from tap() which would override existing tap() on the custom buttons
|
|
31690
31699
|
organizer - (default null) the ZIM Organizer for the list
|
|
@@ -31698,15 +31707,15 @@ pulldown - (default false) set to true to have List act like a Pulldown
|
|
|
31698
31707
|
use tapClose and offClose parameters to optionally adjust behaviour
|
|
31699
31708
|
See: https://zimjs.com/ten/pulldown.html
|
|
31700
31709
|
clone - (default false) set to true to add clones of the list items rather than the items themselves
|
|
31701
|
-
cancelCurrentDrag - (default false)
|
|
31710
|
+
cancelCurrentDrag - (default false) set to true to cancel window dragging when document window loses focus
|
|
31702
31711
|
this functionality seems to work except if ZIM is being used with Animate - so we have left it turned off by default
|
|
31703
|
-
index - (default 0)
|
|
31704
|
-
noScale - (default false)
|
|
31705
|
-
pulldownToggle - (default false)
|
|
31712
|
+
index - (default 0) set the index at start - set to -1 for no selection
|
|
31713
|
+
noScale - (default false) set to true to not scale custom items - this ignores viewNum
|
|
31714
|
+
pulldownToggle - (default false) set to true to collapse list in pulldown mode when final item is selected or pressing off list
|
|
31706
31715
|
optimize - (default true) set to false to not turn DisplayObjects that are not on the stage visible false
|
|
31707
31716
|
as the Window is scrolled, any objects within the content and any objects within one level of those objects
|
|
31708
31717
|
are set to visible false if their bounds are not hitting the stage bounds
|
|
31709
|
-
resizeHandle - (default false)
|
|
31718
|
+
resizeHandle - (default false) set to true to rollover bottom right corner to resize list with resizeHandle
|
|
31710
31719
|
currently, the List content does not automatically expand
|
|
31711
31720
|
so create the list with a width as wide as it will go
|
|
31712
31721
|
then call the resize() method to start the list at the desired width
|
|
@@ -31718,24 +31727,38 @@ resizeBoundary - (default null) add a ZIM Boundary() object for the resize handl
|
|
|
31718
31727
|
resizeVisible - (default false) set to true to always see the resizeHandle - if resizeHandle is set to true
|
|
31719
31728
|
continuous - (default false) set to true to make the list scroll continuously - should have more elements than the viewNum for this
|
|
31720
31729
|
closeOthers - (default false) set to true to close any open branches before expanding selected branch
|
|
31721
|
-
drop - (default false)
|
|
31730
|
+
drop - (default false) set to true to allow drag and drop of items onto the current list
|
|
31722
31731
|
if the list is vertical, dragging the item horizontally will pull it from the list
|
|
31723
31732
|
the item can then be dragged to a different location and dropped in place
|
|
31724
31733
|
for a horizontal list, dragging the item vertical will pull it from the list
|
|
31725
31734
|
also see the dropTargets parameter and the drop and dropTarget properties
|
|
31726
31735
|
note: the dropTargets alone can be set to drop onto other lists but not the current list
|
|
31727
31736
|
also see updateDrop() method if a list has been moved or scaled
|
|
31728
|
-
dropTargets - (default null)
|
|
31737
|
+
dropTargets - (default null) add a list or an array of lists to drop an item from the current list
|
|
31729
31738
|
see the drop parameter and the drop and dropTargets properties
|
|
31730
31739
|
note: dropTargets can be set without setting the drop parameter to true
|
|
31731
31740
|
and then items can be dragged to the target lists but not onto the current list
|
|
31732
31741
|
also see updateDrop() method if a list has been moved or scaled
|
|
31733
|
-
|
|
31734
|
-
|
|
31735
|
-
|
|
31742
|
+
dropSelf - (default true) set to false to not drop on itself if drop is true
|
|
31743
|
+
dropCopy - (default false) set to true to drop a copy
|
|
31744
|
+
dropColor - (default white) the color of the diamond reticle that indicates where an item will be dropped
|
|
31745
|
+
dropThickness - (default 1) the thickness of the diamond reticle that indicates where an item will be dropped
|
|
31746
|
+
dropScrollSpeed - (default 5) the speed the list is scrolled as a drop item is dragged up to 50px off an end of the list
|
|
31736
31747
|
this is only applied if the list scrolls on that end
|
|
31737
31748
|
the speed is multiplied by 1.5 when the item is between 50px and 80px off the end
|
|
31738
|
-
dropReticleAlpha - (default 1)
|
|
31749
|
+
dropReticleAlpha - (default 1) set the alpha of the drop reticle diamond - set to 0 to not show reticle
|
|
31750
|
+
dropScale - (default null) set a scale when dropped
|
|
31751
|
+
dropWidth - (default null) set a width when dropped - overrides scale
|
|
31752
|
+
height will keep proportion unless both dropWidth and dropHeight are provided
|
|
31753
|
+
dropHeight - (default null) set a height when dropped - overrides scale
|
|
31754
|
+
width will keep proportion unless both dropWidth and dropHeight are provided
|
|
31755
|
+
*** Drop parameters that work only when dropping on a dropTarget that is NOT a List
|
|
31756
|
+
dropHitTest - (default "bounds") can also be "reg", "circles", "circle", "rect" - see ZIM HitTests
|
|
31757
|
+
dropFull - (default true) do not drop on a full target
|
|
31758
|
+
note - if the object is removed from the target then a drop can occur again on that target
|
|
31759
|
+
dropSnap - (default true) snap to the target object
|
|
31760
|
+
dropEnd - (default true) once dropped on a target a noMouse() is set on the object
|
|
31761
|
+
*** End drop parameters that work only when dropping on a target that is NOT a List
|
|
31739
31762
|
selectedIndex - same as index, kept in for backwards compatibility in ZIM DUO
|
|
31740
31763
|
style - (default true) set to false to ignore styles set with the STYLE - will receive original parameter defaults
|
|
31741
31764
|
group - (default null) set to String (or comma delimited String) so STYLE can set default styles to the group(s) (like a CSS class)
|
|
@@ -31870,10 +31893,16 @@ dropReticle - each list that can be dropped on gets a dropReticle property that
|
|
|
31870
31893
|
so individual reticles can be adjusted - say different colors for different lists
|
|
31871
31894
|
dropItem - after a dropdown event, the dropItem is the ghost being dragged
|
|
31872
31895
|
dropIndex - after a dropdown event, the dropIndex is the original index of the item being dragged
|
|
31873
|
-
|
|
31896
|
+
dropTarget - after a dropup event, the dropTarget is the object the item was dropped into (could be original list)
|
|
31874
31897
|
dropNewIndex - after a dropup event, the dropNewIndex is the index in the list the item has been dropped
|
|
31875
31898
|
enabled - default is true - set to false to disable
|
|
31876
31899
|
|
|
31900
|
+
DROP ITEM PROPERTIES
|
|
31901
|
+
dropTarget - is the target dropped on
|
|
31902
|
+
dropList - is list item came from
|
|
31903
|
+
|
|
31904
|
+
// dropEnd should not be false if dropBack is true - when dropping from a list
|
|
31905
|
+
|
|
31877
31906
|
ALSO: see all Window properties - like titleBar, titleBarLabel, resizeHandle, etc.
|
|
31878
31907
|
|
|
31879
31908
|
ALSO: see ZIM Container for properties such as:
|
|
@@ -31892,17 +31921,18 @@ dispatches an "expanded" event when items have been expanded
|
|
|
31892
31921
|
this receives an event object with an items property of the items just opened
|
|
31893
31922
|
dispatches a "collapsed" event when items have been collapsed
|
|
31894
31923
|
dispatches a "dropdown" event when drop item is pulled from list
|
|
31895
|
-
list will have dropItem and dropIndex properties
|
|
31924
|
+
list will have dropItem and dropIndex properties
|
|
31896
31925
|
dispatches a "dropup" event when drop item is dropped
|
|
31897
|
-
list will have dropItem,
|
|
31926
|
+
list will have dropItem, dropTarget and dropNewIndex properties
|
|
31927
|
+
item dropped will have dropList for which list it came from and dropTarget for which object it is dropped on
|
|
31898
31928
|
|
|
31899
31929
|
ALSO: All Window events including "scrolling"
|
|
31900
31930
|
|
|
31901
31931
|
ALSO: see the CreateJS Easel Docs for Container events such as:
|
|
31902
31932
|
added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmove, pressup, removed, rollout, rollover
|
|
31903
31933
|
--*///+60.5
|
|
31904
|
-
zim.List = function(width, height, list, viewNum, vertical, currentSelected, align, valign, labelAlign, labelValign, labelIndent, labelIndentH, labelIndentV, indent, spacing, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, downColor, selectedColor, selectedRollColor, borderColor, borderWidth, padding, corner, swipe, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, scrollBarOverlay, slide, slideFactor, slideSnap, slideSnapDamp, shadowColor, shadowBlur, paddingH, paddingV, scrollWheel, damp, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, draggable, boundary, onTop, close, closeColor, collapse, collapseColor, collapsed, excludeCustomTap, organizer, checkBox, pulldown, clone, cancelCurrentDrag, index, noScale, pulldownToggle, optimize, keyEnabled, resizeHandle, resizeBoundary, resizeVisible, continuous, closeOthers, drop, dropTargets, dropColor, dropThickness, dropScrollSpeed, dropReticleAlpha, selectedIndex, style, group, inherit) {
|
|
31905
|
-
var sig = "width, height, list, viewNum, vertical, currentSelected, align, valign, labelAlign, labelValign, labelIndent, labelIndentH, labelIndentV, indent, spacing, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, downColor, selectedColor, selectedRollColor, borderColor, borderWidth, padding, corner, swipe, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, scrollBarOverlay, slide, slideFactor, slideSnap, slideSnapDamp, shadowColor, shadowBlur, paddingH, paddingV, scrollWheel, damp, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, draggable, boundary, onTop, close, closeColor, collapse, collapseColor, collapsed, excludeCustomTap, organizer, checkBox, pulldown, clone, cancelCurrentDrag, index, noScale, pulldownToggle, optimize, keyEnabled, resizeHandle, resizeBoundary, resizeVisible, continuous, closeOthers, drop, dropTargets, dropColor, dropThickness, dropScrollSpeed, dropReticleAlpha, selectedIndex, style, group, inherit";
|
|
31934
|
+
zim.List = function(width, height, list, viewNum, vertical, currentSelected, align, valign, labelAlign, labelValign, labelIndent, labelIndentH, labelIndentV, indent, spacing, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, downColor, selectedColor, selectedRollColor, borderColor, borderWidth, padding, corner, swipe, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, scrollBarOverlay, slide, slideFactor, slideSnap, slideSnapDamp, shadowColor, shadowBlur, paddingH, paddingV, scrollWheel, damp, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, draggable, boundary, onTop, close, closeColor, collapse, collapseColor, collapsed, excludeCustomTap, organizer, checkBox, pulldown, clone, cancelCurrentDrag, index, noScale, pulldownToggle, optimize, keyEnabled, resizeHandle, resizeBoundary, resizeVisible, continuous, closeOthers, drop, dropTargets, dropSelf, dropCopy, dropColor, dropThickness, dropScrollSpeed, dropReticleAlpha, dropHitTest, dropFull, dropSnap, dropEnd, dropScale, dropWidth, dropHeight, selectedIndex, style, group, inherit) {
|
|
31935
|
+
var sig = "width, height, list, viewNum, vertical, currentSelected, align, valign, labelAlign, labelValign, labelIndent, labelIndentH, labelIndentV, indent, spacing, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, downColor, selectedColor, selectedRollColor, borderColor, borderWidth, padding, corner, swipe, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, scrollBarOverlay, slide, slideFactor, slideSnap, slideSnapDamp, shadowColor, shadowBlur, paddingH, paddingV, scrollWheel, damp, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, draggable, boundary, onTop, close, closeColor, collapse, collapseColor, collapsed, excludeCustomTap, organizer, checkBox, pulldown, clone, cancelCurrentDrag, index, noScale, pulldownToggle, optimize, keyEnabled, resizeHandle, resizeBoundary, resizeVisible, continuous, closeOthers, drop, dropTargets, dropSelf, dropCopy, dropColor, dropThickness, dropScrollSpeed, dropReticleAlpha, dropHitTest, dropFull, dropSnap, dropEnd, dropScale, dropWidth, dropHeight, selectedIndex, style, group, inherit";
|
|
31906
31936
|
var duo; if (duo = zob(zim.List, arguments, sig, this)) return duo;
|
|
31907
31937
|
z_d("60.5");
|
|
31908
31938
|
|
|
@@ -31997,11 +32027,22 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
31997
32027
|
|
|
31998
32028
|
if (zot(drop)) drop = DS.drop!=null?DS.drop:false;
|
|
31999
32029
|
if (zot(dropTargets)) dropTargets = DS.dropTargets!=null?DS.dropTargets:null;
|
|
32030
|
+
if (zot(dropSelf)) dropSelf = DS.dropSelf!=null?DS.dropSelf:true;
|
|
32031
|
+
if (zot(dropCopy)) dropCopy = DS.dropCopy!=null?DS.dropCopy:false;
|
|
32000
32032
|
if (zot(dropColor)) dropColor = DS.dropColor!=null?DS.dropColor:zim.white;
|
|
32001
32033
|
if (zot(dropThickness)) dropThickness = DS.dropThickness!=null?DS.dropThickness:1;
|
|
32002
32034
|
if (zot(dropScrollSpeed)) dropScrollSpeed = DS.dropScrollSpeed!=null?DS.dropScrollSpeed:5;
|
|
32003
32035
|
if (zot(dropReticleAlpha)) dropReticleAlpha = DS.dropReticleAlpha!=null?DS.dropReticleAlpha:1;
|
|
32004
32036
|
|
|
32037
|
+
// Drop off list
|
|
32038
|
+
if (zot(dropHitTest)) dropHitTest = DS.dropHitTest!=null?DS.dropHitTest:"bounds";
|
|
32039
|
+
if (zot(dropSnap)) dropSnap = DS.dropSnap!=null?DS.dropSnap:true;
|
|
32040
|
+
if (zot(dropFull)) dropFull = DS.dropFull!=null?DS.dropFull:true;
|
|
32041
|
+
if (zot(dropEnd)) dropEnd = DS.dropEnd!=null?DS.dropEnd:true;
|
|
32042
|
+
if (zot(dropScale)) dropScale = DS.dropScale!=null?DS.dropScale:null;
|
|
32043
|
+
if (zot(dropWidth)) dropWidth = DS.dropWidth!=null?DS.dropWidth:null;
|
|
32044
|
+
if (zot(dropHeight)) dropHeight = DS.dropHeight!=null?DS.dropHeight:null;
|
|
32045
|
+
|
|
32005
32046
|
|
|
32006
32047
|
if (titleBar === false) titleBar = null;
|
|
32007
32048
|
this.vertical = vertical;
|
|
@@ -32678,7 +32719,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
32678
32719
|
// drop and dropTargets are assigned independently but both are added to dropTargets array
|
|
32679
32720
|
if (dropTargets && !Array.isArray(dropTargets)) dropTargets = [dropTargets];
|
|
32680
32721
|
if (!dropTargets) dropTargets = [];
|
|
32681
|
-
if (drop) dropTargets.unshift(that);
|
|
32722
|
+
if (drop && dropSelf) dropTargets.unshift(that);
|
|
32682
32723
|
|
|
32683
32724
|
that.added(function(stage) {
|
|
32684
32725
|
frame = stage.frame;
|
|
@@ -32697,7 +32738,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
32697
32738
|
// e.target can be something in the item - or the item
|
|
32698
32739
|
// but custom List items are usually in a Container
|
|
32699
32740
|
// so want to drag the item which is the child of the container that is in the List items
|
|
32700
|
-
if (!that.items.includes(downItem)) {
|
|
32741
|
+
if (!that.items.includes(downItem)) {
|
|
32701
32742
|
var good = false;
|
|
32702
32743
|
var checkItem = downItem
|
|
32703
32744
|
while(checkItem.parent) {
|
|
@@ -32710,6 +32751,9 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
32710
32751
|
}
|
|
32711
32752
|
if (!good) return;
|
|
32712
32753
|
}
|
|
32754
|
+
// watch - the List item container has a backing rectangle that has a parent that is in the items
|
|
32755
|
+
// so get the parent but then get the content
|
|
32756
|
+
if (that.items.includes(downItem.parent)) downItem = downItem.parent.content;
|
|
32713
32757
|
downPoint = that.globalToLocal(frame.mouseX, frame.mouseY);
|
|
32714
32758
|
itemPoint = downItem.globalToLocal(frame.mouseX, frame.mouseY);
|
|
32715
32759
|
itemIndex = zot(checkItem.znum) ? checkItem.parent.znum : checkItem.znum;
|
|
@@ -32719,45 +32763,6 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
32719
32763
|
that.dropNewIndex = null;
|
|
32720
32764
|
});
|
|
32721
32765
|
|
|
32722
|
-
function scrollUp(target, dropScrollSpeed) {
|
|
32723
|
-
if (target.scrollInt) target.scrollInt.clear();
|
|
32724
|
-
target.scrollInt = zim.interval(.01, function() {
|
|
32725
|
-
if (target.dropReticle.parent) target.dropReticle.removeFrom();
|
|
32726
|
-
if (target.vertical) {
|
|
32727
|
-
target.scrollY += dropScrollSpeed;
|
|
32728
|
-
if (target.scrollY > 0) {
|
|
32729
|
-
target.scrollY = 0;
|
|
32730
|
-
target.scrollInt.clear();
|
|
32731
|
-
}
|
|
32732
|
-
} else {
|
|
32733
|
-
target.scrollX += dropScrollSpeed;
|
|
32734
|
-
if (target.scrollX > 0) {
|
|
32735
|
-
target.scrollX = 0;
|
|
32736
|
-
target.scrollInt.clear();
|
|
32737
|
-
}
|
|
32738
|
-
}
|
|
32739
|
-
}, null, null, null, "seconds");
|
|
32740
|
-
}
|
|
32741
|
-
|
|
32742
|
-
function scrollDown(target, dropScrollSpeed) {
|
|
32743
|
-
if (target.scrollInt) target.scrollInt.clear();
|
|
32744
|
-
target.scrollInt = zim.interval(.01, function() {
|
|
32745
|
-
if (target.dropReticle.parent) target.dropReticle.removeFrom();
|
|
32746
|
-
if (target.vertical) {
|
|
32747
|
-
target.scrollY -= dropScrollSpeed;
|
|
32748
|
-
if (target.scrollY < -target.scrollYMax) {
|
|
32749
|
-
target.scrollY = -target.scrollYMax;
|
|
32750
|
-
target.scrollInt.clear();
|
|
32751
|
-
}
|
|
32752
|
-
} else {
|
|
32753
|
-
target.scrollX -= dropScrollSpeed;
|
|
32754
|
-
if (target.scrollX < -target.scrollXMax) {
|
|
32755
|
-
target.scrollX = -target.scrollXMax;
|
|
32756
|
-
target.scrollInt.clear();
|
|
32757
|
-
}
|
|
32758
|
-
}
|
|
32759
|
-
}, null, null, null, "seconds");
|
|
32760
|
-
}
|
|
32761
32766
|
|
|
32762
32767
|
that.dropMove = that.on("pressmove", function() {
|
|
32763
32768
|
if (ghost || !downPoint) return;
|
|
@@ -32774,179 +32779,86 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
32774
32779
|
) {
|
|
32775
32780
|
that.cancelCurrentDrag();
|
|
32776
32781
|
var sc = downItem.getConcatenatedDisplayProps().matrix.decompose().scaleX/F.stage.scaleX; // sigh
|
|
32777
|
-
ghost = downItem.clone().reg(itemPoint.x, itemPoint.y).sca(sc).alp(.5); //.sha("rgba(0,0,0,.3)",5,5,5);
|
|
32782
|
+
ghost = downItem.clone(true).reg(itemPoint.x, itemPoint.y).sca(sc).alp(.5); //.sha("rgba(0,0,0,.3)",5,5,5);
|
|
32778
32783
|
that.dropItem = ghost;
|
|
32779
32784
|
that.dropIndex = itemIndex;
|
|
32780
32785
|
that.dropStage = frame.stage.on("stagemousemove", function(){
|
|
32781
|
-
ghost.loc(frame.mouseX, frame.mouseY)
|
|
32782
|
-
|
|
32786
|
+
ghost.loc(frame.mouseX, frame.mouseY);
|
|
32783
32787
|
// scroll if ghost is at edges of scrollable list
|
|
32784
|
-
|
|
32785
|
-
zim.loop(dropTargets, function(target) {
|
|
32786
|
-
if (target.type != "List") return;
|
|
32787
|
-
if (onCheck) {
|
|
32788
|
-
if (target.scrollInt) target.scrollInt.clear();
|
|
32789
|
-
target.dropReticle.removeFrom();
|
|
32790
|
-
target.dropReticleIndex = null;
|
|
32791
|
-
return; // next in loop
|
|
32792
|
-
}
|
|
32793
|
-
if (target.vertical) {
|
|
32794
|
-
if (target.scrollYMax > 0) {
|
|
32795
|
-
if (ghost.x > target.zgb.x && ghost.x < target.zgb.x + target.zgb.width) {
|
|
32796
|
-
if (ghost.y < target.zgb.y) { // carefull - need to do these separately to turn off diamond
|
|
32797
|
-
if (ghost.y > target.zgbtarget.zgb.y - 50) scrollUp(target, dropScrollSpeed);
|
|
32798
|
-
else if (ghost.y > target.zgbtarget.zgb.y - 80) scrollUp(target, dropScrollSpeed*1.5);
|
|
32799
|
-
onCheck = true;
|
|
32800
|
-
} else if (ghost.y > target.zgbtarget.zgb.y + target.zgbtarget.zgb.height) {
|
|
32801
|
-
if (ghost.y < target.zgbtarget.zgb.y + target.zgbtarget.zgb.height + 50) scrollDown(target, dropScrollSpeed);
|
|
32802
|
-
else if (ghost.y < target.zgbtarget.zgb.y + target.zgbtarget.zgb.height + 80) scrollDown(target, dropScrollSpeed*1.5);
|
|
32803
|
-
onCheck = true;
|
|
32804
|
-
} else if (target.scrollInt) target.scrollInt.clear();
|
|
32805
|
-
} else {
|
|
32806
|
-
if (target.scrollInt) target.scrollInt.clear();
|
|
32807
|
-
}
|
|
32808
|
-
}
|
|
32809
|
-
} else {
|
|
32810
|
-
if (target.scrollXMax > 0) {
|
|
32811
|
-
if (ghost.y > target.zgb.y && ghost.y < target.zgb.y + target.zgb.height) {
|
|
32812
|
-
if (ghost.x < target.zgb.x) {
|
|
32813
|
-
if (ghost.x > target.zgb.x - 50) scrollUp(target, dropScrollSpeed);
|
|
32814
|
-
else if (ghost.x > target.zgb.x - 80) scrollUp(target, dropScrollSpeed*1.5);
|
|
32815
|
-
onCheck = true;
|
|
32816
|
-
} else if (ghost.x > target.zgb.x + target.zgb.width) {
|
|
32817
|
-
if (ghost.x < target.zgb.x + target.zgb.width + 50) scrollDown(target, dropScrollSpeed);
|
|
32818
|
-
else if (ghost.x < target.zgb.x + target.zgb.width + 80) scrollDown(target, dropScrollSpeed*1.5);
|
|
32819
|
-
onCheck = true;
|
|
32820
|
-
} else if (target.scrollInt) target.scrollInt.clear();
|
|
32821
|
-
} else {
|
|
32822
|
-
if (target.scrollInt) target.scrollInt.clear();
|
|
32823
|
-
}
|
|
32824
|
-
}
|
|
32825
|
-
}
|
|
32826
|
-
|
|
32827
|
-
// place reticle
|
|
32828
|
-
if (target.hitTestReg(ghost)) {
|
|
32829
|
-
onCheck = true;
|
|
32830
|
-
var point = target.tabs.globalToLocal(ghost.x, ghost.y);
|
|
32831
|
-
var item = target.tabs.getObjectUnderPoint(point.x, point.y, 1);
|
|
32832
|
-
var yy;
|
|
32833
|
-
var xx;
|
|
32834
|
-
var bounds;
|
|
32835
|
-
if (item) {
|
|
32836
|
-
checkItem = item;
|
|
32837
|
-
var good = target.items.includes(checkItem);
|
|
32838
|
-
if (zot(item.znum)) {
|
|
32839
|
-
while(checkItem.parent) {
|
|
32840
|
-
if (target.items.includes(checkItem.parent)) {
|
|
32841
|
-
good = true;
|
|
32842
|
-
item = checkItem.parent;
|
|
32843
|
-
break;
|
|
32844
|
-
}
|
|
32845
|
-
checkItem = checkItem.parent;
|
|
32846
|
-
}
|
|
32847
|
-
}
|
|
32848
|
-
if (!good) return;
|
|
32849
|
-
bounds = item.boundsToGlobal();
|
|
32850
|
-
|
|
32851
|
-
// target.dropReticle.visible = true;
|
|
32852
|
-
// if (checkItem == downItem) target.dropReticle.visible = false;
|
|
32853
|
-
|
|
32854
|
-
if (target.vertical) {
|
|
32855
|
-
if (ghost.y > bounds.y + bounds.height/2) {
|
|
32856
|
-
yy = bounds.y + bounds.height + target.spacing*target.zgs/2;
|
|
32857
|
-
if (yy > target.zgb.y && yy < target.zgb.y + target.zgb.height) {
|
|
32858
|
-
target.dropReticle.loc(bounds.x + bounds.width/2, yy);
|
|
32859
|
-
target.dropReticleIndex = item.znum + 1;
|
|
32860
|
-
}
|
|
32861
|
-
} else {
|
|
32862
|
-
yy = bounds.y - target.spacing*target.zgs/2;
|
|
32863
|
-
if (yy > target.zgb.y && yy < target.zgb.y + target.zgb.height) {
|
|
32864
|
-
target.dropReticle.loc(bounds.x + bounds.width/2, yy);
|
|
32865
|
-
target.dropReticleIndex = item.znum;
|
|
32866
|
-
}
|
|
32867
|
-
}
|
|
32868
|
-
} else {
|
|
32869
|
-
if (ghost.x > bounds.x + bounds.width/2) {
|
|
32870
|
-
xx = bounds.x + bounds.width + target.spacing*target.zgs/2;
|
|
32871
|
-
if (xx > target.zgb.x && xx < target.zgb.x + target.zgb.width) {
|
|
32872
|
-
target.dropReticle.loc(xx, bounds.y + bounds.height/2);
|
|
32873
|
-
target.dropReticleIndex = item.znum + 1;
|
|
32874
|
-
}
|
|
32875
|
-
} else {
|
|
32876
|
-
xx = bounds.x - target.spacing*target.zgs/2;
|
|
32877
|
-
if (xx > target.zgb.x && xx < target.zgb.x + target.zgb.width) {
|
|
32878
|
-
target.dropReticle.loc(xx, bounds.y + bounds.height/2);
|
|
32879
|
-
target.dropReticleIndex = item.znum;
|
|
32880
|
-
}
|
|
32881
|
-
}
|
|
32882
|
-
}
|
|
32883
|
-
} else {
|
|
32884
|
-
if (target.items.length > 0) {
|
|
32885
|
-
bounds = target.items[target.items.length-1].boundsToGlobal();
|
|
32886
|
-
if (target.vertical) {
|
|
32887
|
-
if (ghost.y > bounds.y + bounds.height) {
|
|
32888
|
-
yy = bounds.y + bounds.height + target.spacing*target.zgs/2;
|
|
32889
|
-
target.dropReticle.loc(target.zgb.x + target.zgb.width/2, yy);
|
|
32890
|
-
target.dropReticleIndex = target.items.length;
|
|
32891
|
-
} else {
|
|
32892
|
-
target.dropReticle.removeFrom();
|
|
32893
|
-
target.dropReticleIndex = null;
|
|
32894
|
-
}
|
|
32895
|
-
} else {
|
|
32896
|
-
if (ghost.x > bounds.x + bounds.width) {
|
|
32897
|
-
xx = bounds.x + bounds.width + target.spacing*target.zgs/2;
|
|
32898
|
-
target.dropReticle.loc(xx, target.zgb.y + target.zgb.height/2);
|
|
32899
|
-
target.dropReticleIndex = target.items.length;
|
|
32900
|
-
} else {
|
|
32901
|
-
target.dropReticle.removeFrom();
|
|
32902
|
-
target.dropReticleIndex = null;
|
|
32903
|
-
}
|
|
32904
|
-
}
|
|
32905
|
-
} else {
|
|
32906
|
-
if (target.vertical) {
|
|
32907
|
-
yy = target.zgb.y + target.spacing*target.zgs/2;
|
|
32908
|
-
target.dropReticle.loc(target.zgb.x + target.zgb.width/2, yy);
|
|
32909
|
-
target.dropReticleIndex = 0;
|
|
32910
|
-
} else {
|
|
32911
|
-
xx = target.zgb.x + target.spacing*target.zgs/2;
|
|
32912
|
-
target.dropReticle.loc(xx, target.zgb.y + target.zgb.height/2);
|
|
32913
|
-
target.dropReticleIndex = 0;
|
|
32914
|
-
}
|
|
32915
|
-
}
|
|
32916
|
-
}
|
|
32917
|
-
} else {
|
|
32918
|
-
target.dropReticle.removeFrom();
|
|
32919
|
-
target.dropReticleIndex = null;
|
|
32920
|
-
}
|
|
32921
|
-
});
|
|
32788
|
+
zim.List.doDropOver(dropTargets, ghost, checkItem, dropScrollSpeed);
|
|
32922
32789
|
});
|
|
32923
32790
|
|
|
32924
32791
|
that.dispatchEvent("dropdown");
|
|
32925
32792
|
|
|
32926
32793
|
// frame.on("mouseupplus", smu, null, true); // once - but does not work with touch
|
|
32927
|
-
|
|
32928
|
-
frame.stage.on("stagemouseup", smu, null, true); // once - seems to be working on iframes, etc.
|
|
32794
|
+
that.pointerUpEvent = frame.on("pointerup", smu); // pointer does not have a once!
|
|
32795
|
+
// frame.stage.on("stagemouseup", smu, null, true); // once - seems to be working on iframes, etc.
|
|
32929
32796
|
function smu() {
|
|
32930
32797
|
frame.off("pointerup", that.pointerUpEvent)
|
|
32931
32798
|
frame.stage.off("stagemousemove", that.dropStage);
|
|
32932
32799
|
|
|
32933
32800
|
var empty = zim.loop(dropTargets, function(target) {
|
|
32934
|
-
if (target.type != "List")
|
|
32801
|
+
if (target.type != "List") {
|
|
32802
|
+
|
|
32803
|
+
// DROPPING OUTSIDE LIST
|
|
32804
|
+
|
|
32805
|
+
if (ghost["hitTest"+String(dropHitTest).charAt(0).toUpperCase() + String(dropHitTest).slice(1)](target)) {
|
|
32806
|
+
|
|
32807
|
+
if (!dropFull || !target.dropFull) {
|
|
32808
|
+
downItem.alpha = itemAlpha;
|
|
32809
|
+
if (!dropCopy) that.removeAt(1,itemIndex);
|
|
32810
|
+
ghost.reg(downItem.regX, downItem.regY, true);
|
|
32811
|
+
if (dropSnap) ghost.loc(target);
|
|
32812
|
+
if (dropScale) ghost.sca(dropScale);
|
|
32813
|
+
if (dropWidth || dropHeight) ghost.siz(dropWidth, dropHeight);
|
|
32814
|
+
if (dropEnd) ghost.noMouse();
|
|
32815
|
+
if (dropFull) target.dropFull = true;
|
|
32816
|
+
ghost.droppedTarget = target;
|
|
32817
|
+
ghost.dropClone = true;
|
|
32818
|
+
ghost.dropList = that;
|
|
32819
|
+
ghost.dropTarget = target;
|
|
32820
|
+
ghost.alpha = itemAlpha;
|
|
32821
|
+
|
|
32822
|
+
ghost.dropStartX = downItem.dropStartX;
|
|
32823
|
+
ghost.dropStartY = downItem.dropStartY;
|
|
32824
|
+
ghost.dropStartS = downItem.dropStartS;
|
|
32825
|
+
|
|
32826
|
+
that.dropItem = ghost;
|
|
32827
|
+
that.dropTarget = target;
|
|
32828
|
+
ghost = null;
|
|
32829
|
+
downPoint = null;
|
|
32830
|
+
downItem = null;
|
|
32831
|
+
return false;
|
|
32832
|
+
}
|
|
32833
|
+
}
|
|
32834
|
+
return;
|
|
32835
|
+
}
|
|
32935
32836
|
if (target.scrollInt) target.scrollInt.clear();
|
|
32936
32837
|
if (!zot(target.dropReticleIndex)) {
|
|
32937
32838
|
target.dropReticle.removeFrom();
|
|
32938
|
-
that.removeAt(1,itemIndex);
|
|
32839
|
+
if (!dropCopy) that.removeAt(1,itemIndex);
|
|
32939
32840
|
|
|
32940
32841
|
if (itemIndex < target.dropReticleIndex && that == target) target.dropReticleIndex--;
|
|
32941
|
-
|
|
32842
|
+
|
|
32843
|
+
if (dropCopy) {
|
|
32844
|
+
target.addAt(ghost, target.dropReticleIndex);
|
|
32845
|
+
ghost.alpha = itemAlpha;
|
|
32846
|
+
ghost.dropList = that;
|
|
32847
|
+
ghost.dropTarget = target;
|
|
32848
|
+
that.dropItem = ghost;
|
|
32849
|
+
} else {
|
|
32850
|
+
target.addAt(downItem, target.dropReticleIndex);
|
|
32851
|
+
downItem.dropList = that;
|
|
32852
|
+
downItem.dropTarget = target;
|
|
32853
|
+
that.dropItem = downItem;
|
|
32854
|
+
ghost.dispose();
|
|
32855
|
+
}
|
|
32856
|
+
ghost = null;
|
|
32942
32857
|
|
|
32943
|
-
ghost.dispose();
|
|
32944
32858
|
downItem.alpha = itemAlpha;
|
|
32945
|
-
ghost = null;
|
|
32946
32859
|
downPoint = null;
|
|
32947
|
-
|
|
32948
|
-
that.
|
|
32949
|
-
that.dropList = target;
|
|
32860
|
+
|
|
32861
|
+
that.dropTarget = target;
|
|
32950
32862
|
that.dropNewIndex = target.dropReticleIndex;
|
|
32951
32863
|
target.dropReticleIndex = null;
|
|
32952
32864
|
downItem = null;
|
|
@@ -32967,10 +32879,11 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
32967
32879
|
})
|
|
32968
32880
|
that.dropItem = downItem;
|
|
32969
32881
|
that.dropList = that;
|
|
32882
|
+
that.dropTarget = null;
|
|
32970
32883
|
that.dropNewIndex = that.dropIndex;
|
|
32971
32884
|
}
|
|
32972
32885
|
that.dispatchEvent("dropup");
|
|
32973
|
-
|
|
32886
|
+
that.stage.update();
|
|
32974
32887
|
|
|
32975
32888
|
}
|
|
32976
32889
|
downItem.alp(.5);
|
|
@@ -33339,7 +33252,7 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
33339
33252
|
|
|
33340
33253
|
if (style!==false) zim.styleTransforms(this, DS);
|
|
33341
33254
|
this.clone = function() {
|
|
33342
|
-
return that.cloneProps(new zim.List(width, originalHeight, zim.copy(that.originalList, true), viewNum, vertical, currentSelected, align, valign, labelAlign, labelValign, labelIndent, labelIndentH, labelIndentV, indent, spacing, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, downColor, selectedColor, selectedRollColor, originalBorderColor, originalBorderWidth, padding, zim.copy(corner), swipe, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, scrollBarOverlay, slide, slideFactor, slideSnap, slideSnapDamp, shadowColor, shadowBlur, paddingH, paddingV, scrollWheel, damp, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, draggable, boundary, onTop, close, closeColor, collapse, collapseColor, collapsed, excludeCustomTap, organizer, checkBox, pulldown, clone, cancelCurrentDrag, index, noScale, pulldownToggle, optimize, keyEnabled, resizeHandle, resizeBoundary, resizeVisible, continuous, closeOthers, drop, dropTargets, dropColor, dropThickness, dropScrollSpeed, dropReticleAlpha, selectedIndex, style, this.group, inherit));
|
|
33255
|
+
return that.cloneProps(new zim.List(width, originalHeight, zim.copy(that.originalList, true), viewNum, vertical, currentSelected, align, valign, labelAlign, labelValign, labelIndent, labelIndentH, labelIndentV, indent, spacing, backgroundColor, rollBackgroundColor, downBackgroundColor, selectedBackgroundColor, selectedRollBackgroundColor, backdropColor, color, rollColor, downColor, selectedColor, selectedRollColor, originalBorderColor, originalBorderWidth, padding, zim.copy(corner), swipe, scrollBarActive, scrollBarDrag, scrollBarColor, scrollBarAlpha, scrollBarFade, scrollBarH, scrollBarV, scrollBarOverlay, slide, slideFactor, slideSnap, slideSnapDamp, shadowColor, shadowBlur, paddingH, paddingV, scrollWheel, damp, titleBar, titleBarColor, titleBarBackgroundColor, titleBarHeight, draggable, boundary, onTop, close, closeColor, collapse, collapseColor, collapsed, excludeCustomTap, organizer, checkBox, pulldown, clone, cancelCurrentDrag, index, noScale, pulldownToggle, optimize, keyEnabled, resizeHandle, resizeBoundary, resizeVisible, continuous, closeOthers, drop, dropTargets, dropSelf, dropCopy, dropColor, dropThickness, dropScrollSpeed, dropReticleAlpha, dropHitTest, dropFull, dropSnap, dropEnd, dropScale, dropWidth, dropHeight, selectedIndex, style, this.group, inherit));
|
|
33343
33256
|
};
|
|
33344
33257
|
this.dispose = function(a,b,disposing) {
|
|
33345
33258
|
if (!disposing) {
|
|
@@ -33353,6 +33266,188 @@ added, click, dblclick, mousedown, mouseout, mouseover, pressdown (ZIM), pressmo
|
|
|
33353
33266
|
};
|
|
33354
33267
|
zim.extend(zim.List, zim.Window, ["clone","dispose"], "zimWindow", false);
|
|
33355
33268
|
|
|
33269
|
+
|
|
33270
|
+
zim.List.scrollUp = function(target, dropScrollSpeed) {
|
|
33271
|
+
if (target.scrollInt) target.scrollInt.clear();
|
|
33272
|
+
target.scrollInt = zim.interval(.01, function() {
|
|
33273
|
+
if (target.dropReticle.parent) target.dropReticle.removeFrom();
|
|
33274
|
+
if (target.vertical) {
|
|
33275
|
+
target.scrollY += dropScrollSpeed;
|
|
33276
|
+
if (target.scrollY > 0) {
|
|
33277
|
+
target.scrollY = 0;
|
|
33278
|
+
target.scrollInt.clear();
|
|
33279
|
+
}
|
|
33280
|
+
} else {
|
|
33281
|
+
target.scrollX += dropScrollSpeed;
|
|
33282
|
+
if (target.scrollX > 0) {
|
|
33283
|
+
target.scrollX = 0;
|
|
33284
|
+
target.scrollInt.clear();
|
|
33285
|
+
}
|
|
33286
|
+
}
|
|
33287
|
+
}, null, null, null, "seconds");
|
|
33288
|
+
}
|
|
33289
|
+
|
|
33290
|
+
zim.List.scrollDown = function(target, dropScrollSpeed) {
|
|
33291
|
+
if (target.scrollInt) target.scrollInt.clear();
|
|
33292
|
+
target.scrollInt = zim.interval(.01, function() {
|
|
33293
|
+
if (target.dropReticle.parent) target.dropReticle.removeFrom();
|
|
33294
|
+
if (target.vertical) {
|
|
33295
|
+
target.scrollY -= dropScrollSpeed;
|
|
33296
|
+
if (target.scrollY < -target.scrollYMax) {
|
|
33297
|
+
target.scrollY = -target.scrollYMax;
|
|
33298
|
+
target.scrollInt.clear();
|
|
33299
|
+
}
|
|
33300
|
+
} else {
|
|
33301
|
+
target.scrollX -= dropScrollSpeed;
|
|
33302
|
+
if (target.scrollX < -target.scrollXMax) {
|
|
33303
|
+
target.scrollX = -target.scrollXMax;
|
|
33304
|
+
target.scrollInt.clear();
|
|
33305
|
+
}
|
|
33306
|
+
}
|
|
33307
|
+
}, null, null, null, "seconds");
|
|
33308
|
+
}
|
|
33309
|
+
|
|
33310
|
+
zim.List.doDropOver = function(dropTargets, ghost, checkItem, dropScrollSpeed) {
|
|
33311
|
+
var onCheck;
|
|
33312
|
+
zim.loop(dropTargets, function(target) {
|
|
33313
|
+
if (target.type != "List") return;
|
|
33314
|
+
if (onCheck) {
|
|
33315
|
+
if (target.scrollInt) target.scrollInt.clear();
|
|
33316
|
+
target.dropReticle.removeFrom();
|
|
33317
|
+
target.dropReticleIndex = null;
|
|
33318
|
+
return; // next in loop
|
|
33319
|
+
}
|
|
33320
|
+
if (target.vertical) {
|
|
33321
|
+
if (target.scrollYMax > 0) {
|
|
33322
|
+
if (ghost.x > target.zgb.x && ghost.x < target.zgb.x + target.zgb.width) {
|
|
33323
|
+
if (ghost.y < target.zgb.y) { // carefull - need to do these separately to turn off diamond
|
|
33324
|
+
if (ghost.y > target.zgb.y - 50) zim.List.scrollUp(target, dropScrollSpeed);
|
|
33325
|
+
else if (ghost.y > target.zgb.y - 80) zim.List.scrollUp(target, dropScrollSpeed*1.5);
|
|
33326
|
+
onCheck = true;
|
|
33327
|
+
} else if (ghost.y > target.zgb.y + target.zgb.height) {
|
|
33328
|
+
if (ghost.y < target.zgb.y + target.zgb.height + 50) zim.List.scrollDown(target, dropScrollSpeed);
|
|
33329
|
+
else if (ghost.y < target.zgb.y + target.zgb.height + 80) zim.List.scrollDown(target, dropScrollSpeed*1.5);
|
|
33330
|
+
onCheck = true;
|
|
33331
|
+
} else if (target.scrollInt) target.scrollInt.clear();
|
|
33332
|
+
} else {
|
|
33333
|
+
if (target.scrollInt) target.scrollInt.clear();
|
|
33334
|
+
}
|
|
33335
|
+
}
|
|
33336
|
+
} else {
|
|
33337
|
+
if (target.scrollXMax > 0) {
|
|
33338
|
+
if (ghost.y > target.zgb.y && ghost.y < target.zgb.y + target.zgb.height) {
|
|
33339
|
+
if (ghost.x < target.zgb.x) {
|
|
33340
|
+
if (ghost.x > target.zgb.x - 50) zim.List.scrollUp(target, dropScrollSpeed);
|
|
33341
|
+
else if (ghost.x > target.zgb.x - 80) zim.List.scrollUp(target, dropScrollSpeed*1.5);
|
|
33342
|
+
onCheck = true;
|
|
33343
|
+
} else if (ghost.x > target.zgb.x + target.zgb.width) {
|
|
33344
|
+
if (ghost.x < target.zgb.x + target.zgb.width + 50) zim.List.scrollDown(target, dropScrollSpeed);
|
|
33345
|
+
else if (ghost.x < target.zgb.x + target.zgb.width + 80) zim.List.scrollDown(target, dropScrollSpeed*1.5);
|
|
33346
|
+
onCheck = true;
|
|
33347
|
+
} else if (target.scrollInt) target.scrollInt.clear();
|
|
33348
|
+
} else {
|
|
33349
|
+
if (target.scrollInt) target.scrollInt.clear();
|
|
33350
|
+
}
|
|
33351
|
+
}
|
|
33352
|
+
}
|
|
33353
|
+
|
|
33354
|
+
// place reticle
|
|
33355
|
+
if (target.hitTestReg(ghost)) {
|
|
33356
|
+
onCheck = true;
|
|
33357
|
+
var point = target.tabs.globalToLocal(ghost.x, ghost.y);
|
|
33358
|
+
var item = target.tabs.getObjectUnderPoint(point.x, point.y, 1);
|
|
33359
|
+
var yy;
|
|
33360
|
+
var xx;
|
|
33361
|
+
var bounds;
|
|
33362
|
+
if (item) {
|
|
33363
|
+
checkItem = item;
|
|
33364
|
+
var good = target.items.includes(checkItem);
|
|
33365
|
+
if (zot(item.znum)) {
|
|
33366
|
+
while(checkItem.parent) {
|
|
33367
|
+
if (target.items.includes(checkItem.parent)) {
|
|
33368
|
+
good = true;
|
|
33369
|
+
item = checkItem.parent;
|
|
33370
|
+
break;
|
|
33371
|
+
}
|
|
33372
|
+
checkItem = checkItem.parent;
|
|
33373
|
+
}
|
|
33374
|
+
}
|
|
33375
|
+
if (!good) return;
|
|
33376
|
+
bounds = item.boundsToGlobal();
|
|
33377
|
+
|
|
33378
|
+
// target.dropReticle.visible = true;
|
|
33379
|
+
// if (checkItem == downItem) target.dropReticle.visible = false;
|
|
33380
|
+
|
|
33381
|
+
if (target.vertical) {
|
|
33382
|
+
if (ghost.y > bounds.y + bounds.height/2) {
|
|
33383
|
+
yy = bounds.y + bounds.height + target.spacing*target.zgs/2;
|
|
33384
|
+
if (yy > target.zgb.y && yy < target.zgb.y + target.zgb.height) {
|
|
33385
|
+
target.dropReticle.loc(bounds.x + bounds.width/2, yy);
|
|
33386
|
+
target.dropReticleIndex = item.znum + 1;
|
|
33387
|
+
}
|
|
33388
|
+
} else {
|
|
33389
|
+
yy = bounds.y - target.spacing*target.zgs/2;
|
|
33390
|
+
if (yy > target.zgb.y && yy < target.zgb.y + target.zgb.height) {
|
|
33391
|
+
target.dropReticle.loc(bounds.x + bounds.width/2, yy);
|
|
33392
|
+
target.dropReticleIndex = item.znum;
|
|
33393
|
+
}
|
|
33394
|
+
}
|
|
33395
|
+
} else {
|
|
33396
|
+
if (ghost.x > bounds.x + bounds.width/2) {
|
|
33397
|
+
xx = bounds.x + bounds.width + target.spacing*target.zgs/2;
|
|
33398
|
+
if (xx > target.zgb.x && xx < target.zgb.x + target.zgb.width) {
|
|
33399
|
+
target.dropReticle.loc(xx, bounds.y + bounds.height/2);
|
|
33400
|
+
target.dropReticleIndex = item.znum + 1;
|
|
33401
|
+
}
|
|
33402
|
+
} else {
|
|
33403
|
+
xx = bounds.x - target.spacing*target.zgs/2;
|
|
33404
|
+
if (xx > target.zgb.x && xx < target.zgb.x + target.zgb.width) {
|
|
33405
|
+
target.dropReticle.loc(xx, bounds.y + bounds.height/2);
|
|
33406
|
+
target.dropReticleIndex = item.znum;
|
|
33407
|
+
}
|
|
33408
|
+
}
|
|
33409
|
+
}
|
|
33410
|
+
} else {
|
|
33411
|
+
if (target.items.length > 0) {
|
|
33412
|
+
bounds = target.items[target.items.length-1].boundsToGlobal();
|
|
33413
|
+
if (target.vertical) {
|
|
33414
|
+
if (ghost.y > bounds.y + bounds.height) {
|
|
33415
|
+
yy = bounds.y + bounds.height + target.spacing*target.zgs/2;
|
|
33416
|
+
target.dropReticle.loc(target.zgb.x + target.zgb.width/2, yy);
|
|
33417
|
+
target.dropReticleIndex = target.items.length;
|
|
33418
|
+
} else {
|
|
33419
|
+
target.dropReticle.removeFrom();
|
|
33420
|
+
target.dropReticleIndex = null;
|
|
33421
|
+
}
|
|
33422
|
+
} else {
|
|
33423
|
+
if (ghost.x > bounds.x + bounds.width) {
|
|
33424
|
+
xx = bounds.x + bounds.width + target.spacing*target.zgs/2;
|
|
33425
|
+
target.dropReticle.loc(xx, target.zgb.y + target.zgb.height/2);
|
|
33426
|
+
target.dropReticleIndex = target.items.length;
|
|
33427
|
+
} else {
|
|
33428
|
+
target.dropReticle.removeFrom();
|
|
33429
|
+
target.dropReticleIndex = null;
|
|
33430
|
+
}
|
|
33431
|
+
}
|
|
33432
|
+
} else {
|
|
33433
|
+
if (target.vertical) {
|
|
33434
|
+
yy = target.zgb.y + target.spacing*target.zgs/2;
|
|
33435
|
+
target.dropReticle.loc(target.zgb.x + target.zgb.width/2, yy);
|
|
33436
|
+
target.dropReticleIndex = 0;
|
|
33437
|
+
} else {
|
|
33438
|
+
xx = target.zgb.x + target.spacing*target.zgs/2;
|
|
33439
|
+
target.dropReticle.loc(xx, target.zgb.y + target.zgb.height/2);
|
|
33440
|
+
target.dropReticleIndex = 0;
|
|
33441
|
+
}
|
|
33442
|
+
}
|
|
33443
|
+
}
|
|
33444
|
+
} else {
|
|
33445
|
+
target.dropReticle.removeFrom();
|
|
33446
|
+
target.dropReticleIndex = null;
|
|
33447
|
+
}
|
|
33448
|
+
});
|
|
33449
|
+
}
|
|
33450
|
+
|
|
33356
33451
|
zim.List.makeBase = function(c, label, paddingLeft, backgroundColor) {
|
|
33357
33452
|
if (zot(backgroundColor)) backgroundColor = zim.dark;
|
|
33358
33453
|
c.backing = new zim.Rectangle(c.width, c.height, backgroundColor).center(c);
|
|
@@ -45677,10 +45772,12 @@ only if the TextArea is directly in the Pane or the page (not nested in further
|
|
|
45677
45772
|
|
|
45678
45773
|
NOTE: rotation and skewing of TextArea is not supported - although might work with custom CSS transformations
|
|
45679
45774
|
|
|
45680
|
-
NOTE: because of these limitations, consider the TextEditor as a solution.
|
|
45775
|
+
NOTE: because of these limitations, consider the TextEditor or TextInput as a solution.
|
|
45681
45776
|
The TextEditor allows you to use a Label which is a proper part of the Canvas
|
|
45682
45777
|
and then change the label with a pop-up editor that includes a TextArea.
|
|
45683
45778
|
SEE: https://zimjs.com/cat/texteditor.html
|
|
45779
|
+
TextInput is a one line input text field that is actually part of the canvas
|
|
45780
|
+
SEE https://zimjs.com/explore/textinput.html
|
|
45684
45781
|
|
|
45685
45782
|
NOTE: as of ZIM 5.5.0 the zim namespace is no longer required (unless zns is set to true before running zim)
|
|
45686
45783
|
|
|
@@ -48857,7 +48954,7 @@ RETURNS obj for chaining
|
|
|
48857
48954
|
};//-47.95
|
|
48858
48955
|
|
|
48859
48956
|
/*--
|
|
48860
|
-
obj.drag = function(boundary, axis, overCursor, dragCursor, all, swipe, localBoundary, onTop, surround, slide, slideFactor, slideSnap, slideSnapDamp, reg, removeTweens, startBounds, rect, currentTarget, offStage, immediateBoundary, singleTouch)
|
|
48957
|
+
obj.drag = function(boundary, axis, overCursor, dragCursor, all, swipe, localBoundary, onTop, surround, slide, slideFactor, slideSnap, slideSnapDamp, reg, removeTweens, startBounds, rect, currentTarget, offStage, immediateBoundary, singleTouch, dropTargets, dropCopy, dropSnap, dropBack, dropEnd, dropFull, dropHitTest, dropScale, dropWidth, dropHeight)
|
|
48861
48958
|
|
|
48862
48959
|
drag
|
|
48863
48960
|
zim DisplayObject method
|
|
@@ -48868,6 +48965,12 @@ Handles scaled, rotated nested objects.
|
|
|
48868
48965
|
Also see draggable property for setting a default drag() and noDrag()
|
|
48869
48966
|
and to indicate whether a drag has been set.
|
|
48870
48967
|
|
|
48968
|
+
DROP
|
|
48969
|
+
As if ZIM 017, drop parameters and properties have been added.
|
|
48970
|
+
These allow List items to be dragged and dropped on targets and ZIM Lists
|
|
48971
|
+
Also see ZIM List drop parameters
|
|
48972
|
+
See https://zimjs.com/017/dropping.html
|
|
48973
|
+
|
|
48871
48974
|
NOTE: drag() will stop ZIM Swipe() from triggering a swipe event.
|
|
48872
48975
|
Set the overridNoSwipe parameter of ZIM Swipe() to true to capture swipe events.
|
|
48873
48976
|
|
|
@@ -48916,6 +49019,18 @@ circle.on("mousedown", ()=>{
|
|
|
48916
49019
|
circle.on("pressup", ()=>{circle.dragBoundary()});
|
|
48917
49020
|
END EXAMPLE
|
|
48918
49021
|
|
|
49022
|
+
EXAMPLE
|
|
49023
|
+
// Dropping on targets
|
|
49024
|
+
// see also https://zimjs.com/017/dropping.html
|
|
49025
|
+
const rectangles = new Tile(new Rectangle(130,130).reg(CENTER),3,1,50,0).pos(0,100,CENTER,CENTER);
|
|
49026
|
+
new Tile(new Circle(50,series(red,blue,pink)),3,1,70,0).pos(0,-100,CENTER,CENTER).drag({
|
|
49027
|
+
dropTargets:rectangles.items,
|
|
49028
|
+
// dropEnd:false,
|
|
49029
|
+
// dropCopy:true,
|
|
49030
|
+
// dropBack:false // and more!
|
|
49031
|
+
});
|
|
49032
|
+
END EXAMPLE
|
|
49033
|
+
|
|
48919
49034
|
PARAMETERS supports DUO - parameters or single object with properties below
|
|
48920
49035
|
boundary - (default null) a ZIM Boundary object for the drag boundary
|
|
48921
49036
|
or a ZIM DisplayObject including stage
|
|
@@ -48967,6 +49082,21 @@ immediateBoundary - (default false) set to true to add bounds immediately when d
|
|
|
48967
49082
|
this is normally set to false for a .05 second delay to allow objects to be added to Container before setting bounds.
|
|
48968
49083
|
singleTouch - (default false) set to true to let only one touch operate the drag
|
|
48969
49084
|
also see Frame() singleTouch setting - but setting on drag will only affect that object's drag
|
|
49085
|
+
dropTargets - an object or an array of objects that can receive a drop
|
|
49086
|
+
this can be a List or a Container or a single object
|
|
49087
|
+
if it is a list see the dropListProps as well to set reticle properties and scroll speed
|
|
49088
|
+
dropCopy - (default false) make a copy of the object as it is being dragged
|
|
49089
|
+
dropSnap - (default true) snap to the target object
|
|
49090
|
+
dropBack - (default true) go back to start if not dropped on a target
|
|
49091
|
+
dropEnd - (default true) once dropped on a target a noMouse() is set on the object
|
|
49092
|
+
dropFull - (default true) do not drop on a full target
|
|
49093
|
+
note - if the object is removed from the target then a drop can occur again on that target
|
|
49094
|
+
dropHitTest - (default "bounds") can also be "reg", "circles", "circle", "rect" - see ZIM HitTests
|
|
49095
|
+
dropScale - set a scale for the dropped object
|
|
49096
|
+
dropWidth - set a width for the dropped object - overrides scale
|
|
49097
|
+
height will keep aspect ratio unless dropHeight is provided
|
|
49098
|
+
dropHeight - set a height for the dropped object - overrides scale
|
|
49099
|
+
width will keep aspect ratio unless dropWidth is provided
|
|
48970
49100
|
|
|
48971
49101
|
note: will not update stage if OPTIMIZE is set to true
|
|
48972
49102
|
unless Ticker.update is set to true or you run Ticker.always(stage) see zim.Ticker
|
|
@@ -48974,6 +49104,19 @@ unless Ticker.update is set to true or you run Ticker.always(stage) see zim.Tick
|
|
|
48974
49104
|
PROPERTIES
|
|
48975
49105
|
adds a dragPaused property to get or set the pause of the drag - which allows setting to be kept
|
|
48976
49106
|
see also noDrag() where settings will be removed
|
|
49107
|
+
*** if dropTargets is set then drag() adds the following properties to the dragged object:
|
|
49108
|
+
dropTarget - on pressup, what target the object is dropped on (or null)
|
|
49109
|
+
dropList - which List if any a dropped object has
|
|
49110
|
+
dropListProps - to be used if planning on dropping object into a List
|
|
49111
|
+
The dropListProps have the following default values
|
|
49112
|
+
{
|
|
49113
|
+
color:white,
|
|
49114
|
+
thickness:1,
|
|
49115
|
+
alpha:1,
|
|
49116
|
+
speed:5
|
|
49117
|
+
}
|
|
49118
|
+
These can be changed to set List reticle properties and drop speed
|
|
49119
|
+
See the ZIM List drop parameters for more information
|
|
48977
49120
|
|
|
48978
49121
|
EVENTS
|
|
48979
49122
|
Adds a "slidestart" event to the drag object that is dispatched when the object starts sliding - if slide is true
|
|
@@ -48981,8 +49124,8 @@ Adds a "slidestop" event to the drag object that is dispatched when the object c
|
|
|
48981
49124
|
|
|
48982
49125
|
RETURNS obj for chaining
|
|
48983
49126
|
--*///+31
|
|
48984
|
-
zim.drag = function(obj, boundary, axis, overCursor, dragCursor, all, swipe, localBoundary, onTop, surround, slide, slideFactor, slideSnap, slideSnapDamp, reg, removeTweens, startBounds, rect, currentTarget, offStage, immediateBoundary, singleTouch) {
|
|
48985
|
-
var sig = "obj, boundary, axis, overCursor, dragCursor, all, swipe, localBoundary, onTop, surround, slide, slideFactor, slideSnap, slideSnapDamp, reg, removeTweens, startBounds, rect, currentTarget, offStage, immediateBoundary, singleTouch";
|
|
49127
|
+
zim.drag = function(obj, boundary, axis, overCursor, dragCursor, all, swipe, localBoundary, onTop, surround, slide, slideFactor, slideSnap, slideSnapDamp, reg, removeTweens, startBounds, rect, currentTarget, offStage, immediateBoundary, singleTouch, dropTargets, dropCopy, dropSnap, dropBack, dropEnd, dropFull, dropHitTest, dropScale, dropWidth, dropHeight) {
|
|
49128
|
+
var sig = "obj, boundary, axis, overCursor, dragCursor, all, swipe, localBoundary, onTop, surround, slide, slideFactor, slideSnap, slideSnapDamp, reg, removeTweens, startBounds, rect, currentTarget, offStage, immediateBoundary, singleTouch, dropTargets, dropCopy, dropSnap, dropBack, dropEnd, dropFull, dropHitTest, dropScale, dropWidth, dropHeight";
|
|
48986
49129
|
var duo; if (duo = zob(zim.drag, arguments, sig)) return duo;
|
|
48987
49130
|
if (obj.type=="AC"&&WW.zdf) {WW.zdf.ac("drag", arguments); return obj;}
|
|
48988
49131
|
z_d("31");
|
|
@@ -49033,7 +49176,20 @@ RETURNS obj for chaining
|
|
|
49033
49176
|
if (zot(startBounds)) startBounds = true;
|
|
49034
49177
|
if (zot(boundary) && !zot(rect)) boundary = rect;
|
|
49035
49178
|
if (zot(singleTouch)) singleTouch = false;
|
|
49036
|
-
|
|
49179
|
+
|
|
49180
|
+
if (dropTargets) {
|
|
49181
|
+
slide = false;
|
|
49182
|
+
obj.dropTargets = dropTargets;
|
|
49183
|
+
}
|
|
49184
|
+
if (zot(dropBack)) dropBack = true;
|
|
49185
|
+
if (zot(dropSnap)) dropSnap = true;
|
|
49186
|
+
if (zot(dropEnd)) dropEnd = true;
|
|
49187
|
+
if (zot(dropFull)) dropFull = true;
|
|
49188
|
+
var hitTypes = ["reg", "circles", "rect", "circle"];
|
|
49189
|
+
if (dropHitTest) dropHitTest.toLowerCase();
|
|
49190
|
+
if (!hitTypes.includes(dropHitTest)) dropHitTest = null;
|
|
49191
|
+
if (zot(dropHitTest)) dropHitTest = "bounds";
|
|
49192
|
+
|
|
49037
49193
|
obj.dragPaused = false;
|
|
49038
49194
|
|
|
49039
49195
|
if (slide) {
|
|
@@ -49174,6 +49330,7 @@ RETURNS obj for chaining
|
|
|
49174
49330
|
var stage;
|
|
49175
49331
|
obj.pointers = {};
|
|
49176
49332
|
var stCheck = false;
|
|
49333
|
+
var dropListCheck;
|
|
49177
49334
|
obj.zimDown = obj.on("mousedown", function(e) {
|
|
49178
49335
|
if (!obj.stage || obj.dragPaused) return;
|
|
49179
49336
|
if (singleTouch && stCheck) {
|
|
@@ -49185,6 +49342,7 @@ RETURNS obj for chaining
|
|
|
49185
49342
|
// obj.zimMove = obj.on("pressmove", obj.zimMove); // for some reason causing squiggle drag problems
|
|
49186
49343
|
|
|
49187
49344
|
stCheck = true;
|
|
49345
|
+
dropListCheck = false;
|
|
49188
49346
|
stage = obj.stage;
|
|
49189
49347
|
if (!obj.zmu) obj.zmu = stage.frame.on("mouseupplus", function(e) {
|
|
49190
49348
|
if (obj.downCheck) {
|
|
@@ -49192,6 +49350,7 @@ RETURNS obj for chaining
|
|
|
49192
49350
|
doUp(e, true); // true for cancel slide
|
|
49193
49351
|
}
|
|
49194
49352
|
});
|
|
49353
|
+
|
|
49195
49354
|
obj.dragMouseX = Math.round(e.stageX/zim.scaX)+stage.x;
|
|
49196
49355
|
obj.dragMouseY = Math.round(e.stageY/zim.scaY)+stage.y;
|
|
49197
49356
|
var id = "id"+Math.abs(e.pointerID+1);
|
|
@@ -49201,6 +49360,8 @@ RETURNS obj for chaining
|
|
|
49201
49360
|
// bring stageX and stageY into the parent's frame of reference
|
|
49202
49361
|
// could use e.localX and e.localY but might be dragging container or contents
|
|
49203
49362
|
dragObject = (currentTarget)?e.currentTarget:e.target;
|
|
49363
|
+
|
|
49364
|
+
|
|
49204
49365
|
if (obj.zimBoundary && !dragObject.getBounds()) {zogy("zim.drag() - drag object needs bounds set"); return;}
|
|
49205
49366
|
obj.downCheck = true;
|
|
49206
49367
|
obj.stage.mouseMoveOutside = true;
|
|
@@ -49268,6 +49429,44 @@ RETURNS obj for chaining
|
|
|
49268
49429
|
moveCheck = false;
|
|
49269
49430
|
}
|
|
49270
49431
|
|
|
49432
|
+
// DROP - added ZIM 017 Patch
|
|
49433
|
+
if (zot(dragObject.dropStartS)) {
|
|
49434
|
+
dragObject.dropStartX = dragObject.x;
|
|
49435
|
+
dragObject.dropStartY = dragObject.y;
|
|
49436
|
+
dragObject.dropStartS = dragObject.scale;
|
|
49437
|
+
}
|
|
49438
|
+
if (obj.dropTargets && dropCopy && !dragObject.dropClone) {
|
|
49439
|
+
if (dragObject.clone) {
|
|
49440
|
+
dragObject.dropCopy = dragObject.clone(true).addTo(dragObject.parent, dragObject.parent.getChildIndex(dragObject));
|
|
49441
|
+
dragObject.dropCopy.dropClone = true;
|
|
49442
|
+
dragObject.dropCopy.dropStartX = dragObject.dropStartX;
|
|
49443
|
+
dragObject.dropCopy.dropStartY = dragObject.dropStartY;
|
|
49444
|
+
dragObject.dropCopy.dropStartS = dragObject.dropStartS;
|
|
49445
|
+
dragObject.dropCopy.noMouse();
|
|
49446
|
+
}
|
|
49447
|
+
}
|
|
49448
|
+
// HANDLE DROP ON LIST
|
|
49449
|
+
if (obj.dropTargets) {
|
|
49450
|
+
var notList = true;
|
|
49451
|
+
zim.loop(obj.dropTargets, function(target){
|
|
49452
|
+
if (target.type == "List") {
|
|
49453
|
+
if (!obj.dropListProps) obj.dropListProps = {
|
|
49454
|
+
color:white,
|
|
49455
|
+
thickness:1,
|
|
49456
|
+
alpha:1,
|
|
49457
|
+
speed:5
|
|
49458
|
+
};
|
|
49459
|
+
if (!target.dropReticle) {
|
|
49460
|
+
target.dropReticle = new zim.Rectangle(20,20,clear,obj.dropListProps.color,obj.dropListProps.thickness).reg(CENTER).rot(45).alp(obj.dropListProps.alpha);
|
|
49461
|
+
target.dropReticleIndex = null;
|
|
49462
|
+
target.zgb = target.boundsToGlobal();
|
|
49463
|
+
target.zgs = target.getConcatenatedDisplayProps().matrix.decompose().scaleX/stage.scaleX;
|
|
49464
|
+
}
|
|
49465
|
+
notList = false;
|
|
49466
|
+
}
|
|
49467
|
+
});
|
|
49468
|
+
dropListCheck = !notList;
|
|
49469
|
+
}
|
|
49271
49470
|
}, true);
|
|
49272
49471
|
|
|
49273
49472
|
obj.zimMove = obj.on("pressmove", function(e) {
|
|
@@ -49289,8 +49488,18 @@ RETURNS obj for chaining
|
|
|
49289
49488
|
if (dragObject.ZIMoutlineShape) dragObject.outline();
|
|
49290
49489
|
if (obj.type == "Pen" && !moveCheck && obj.drawing) moveCheck = true;
|
|
49291
49490
|
else if (obj.type == "Tag" || obj.type == "TextArea" || obj.type == "Loader") obj.resize();
|
|
49491
|
+
|
|
49492
|
+
// DROP ON LIST - added ZIM 017
|
|
49493
|
+
if (dropListCheck) {
|
|
49494
|
+
// scroll if ghost is at edges of scrollable list
|
|
49495
|
+
var ghost = dragObject;
|
|
49496
|
+
var checkItem;
|
|
49497
|
+
var dropScrollSpeed = obj.dropListProps.speed;
|
|
49498
|
+
zim.List.doDropOver(dropTargets, ghost, checkItem, dropScrollSpeed);
|
|
49499
|
+
}
|
|
49292
49500
|
}, true);
|
|
49293
49501
|
|
|
49502
|
+
|
|
49294
49503
|
// obj.off("pressmove",obj.zimMove); // for some reason causing squiggle drag problems
|
|
49295
49504
|
|
|
49296
49505
|
function positionObject(o, x, y) {
|
|
@@ -49369,6 +49578,7 @@ RETURNS obj for chaining
|
|
|
49369
49578
|
}
|
|
49370
49579
|
}
|
|
49371
49580
|
|
|
49581
|
+
|
|
49372
49582
|
obj.zimPosition = positionObject;
|
|
49373
49583
|
|
|
49374
49584
|
obj.zimUp = obj.on("pressup", function(e){doUp(e);}, true);
|
|
@@ -49456,9 +49666,96 @@ RETURNS obj for chaining
|
|
|
49456
49666
|
// if (moveCheck) obj.stopCheck();
|
|
49457
49667
|
}
|
|
49458
49668
|
}
|
|
49669
|
+
|
|
49670
|
+
// DROP - added ZIM 017 patch
|
|
49671
|
+
|
|
49672
|
+
if (obj.dropTargets) {
|
|
49673
|
+
if (!Array.isArray(obj.dropTargets)) obj.dropTargets = [obj.dropTargets];
|
|
49674
|
+
// watch - could drop from one target to another
|
|
49675
|
+
if (dragObject.droppedTarget) {
|
|
49676
|
+
dragObject.droppedTarget.dropFull = false;
|
|
49677
|
+
dragObject.droppedTarget = null;
|
|
49678
|
+
}
|
|
49679
|
+
var miss = zim.loop(obj.dropTargets, function(target) {
|
|
49680
|
+
|
|
49681
|
+
if (target.type == "List") {
|
|
49682
|
+
if (target.scrollInt) target.scrollInt.clear();
|
|
49683
|
+
if (!zot(target.dropReticleIndex)) {
|
|
49684
|
+
target.dropReticle.removeFrom();
|
|
49685
|
+
var placeObject = dragObject;
|
|
49686
|
+
if (dropCopy) {
|
|
49687
|
+
// need to do the swap on one of these
|
|
49688
|
+
if (dropCopy && dragObject.dropCopy) {
|
|
49689
|
+
placeObject = dragObject.dropCopy;
|
|
49690
|
+
swapProperties("x", dragObject, placeObject);
|
|
49691
|
+
swapProperties("y", dragObject, placeObject);
|
|
49692
|
+
}
|
|
49693
|
+
}
|
|
49694
|
+
if (dropScale) placeObject.sca(dropScale);
|
|
49695
|
+
if (dropWidth || dropHeight) placeObject.siz(dropWidth, dropHeight);
|
|
49696
|
+
if (dropEnd) placeObject.noMouse();
|
|
49697
|
+
else placeObject.mouse();
|
|
49698
|
+
placeObject.droppedTarget = target;
|
|
49699
|
+
target.addAt(placeObject, target.dropReticleIndex);
|
|
49700
|
+
|
|
49701
|
+
target.dropItem = dragObject;
|
|
49702
|
+
target.dropList = target;
|
|
49703
|
+
target.dropNewIndex = target.dropReticleIndex;
|
|
49704
|
+
target.dropReticleIndex = null;
|
|
49705
|
+
return false
|
|
49706
|
+
}
|
|
49707
|
+
return;
|
|
49708
|
+
}
|
|
49709
|
+
|
|
49710
|
+
if (dragObject["hitTest"+String(dropHitTest).charAt(0).toUpperCase() + String(dropHitTest).slice(1)](target)) {
|
|
49711
|
+
if (!dropFull || !target.dropFull) {
|
|
49712
|
+
var placeObject = dragObject;
|
|
49713
|
+
if (dropCopy && dragObject.dropCopy) {
|
|
49714
|
+
placeObject = dragObject.dropCopy;
|
|
49715
|
+
swapProperties("x", dragObject, placeObject);
|
|
49716
|
+
swapProperties("y", dragObject, placeObject);
|
|
49717
|
+
}
|
|
49718
|
+
// clone gets all these things
|
|
49719
|
+
if (dropSnap) placeObject.loc(target);
|
|
49720
|
+
if (dropScale) placeObject.sca(dropScale);
|
|
49721
|
+
if (dropWidth || dropHeight) placeObject.siz(dropWidth, dropHeight);
|
|
49722
|
+
if (dropEnd) placeObject.noMouse();
|
|
49723
|
+
else placeObject.mouse();
|
|
49724
|
+
if (dropFull) target.dropFull = true;
|
|
49725
|
+
placeObject.droppedTarget = target;
|
|
49726
|
+
return false;
|
|
49727
|
+
}
|
|
49728
|
+
}
|
|
49729
|
+
});
|
|
49730
|
+
if (miss) {
|
|
49731
|
+
if (dropBack) {
|
|
49732
|
+
dragObject.animate({
|
|
49733
|
+
props:{x:dragObject.dropStartX, y:dragObject.dropStartY, scale:dragObject.dropStartS},
|
|
49734
|
+
time:.2,
|
|
49735
|
+
timeUnit:"s",
|
|
49736
|
+
call:function(target) {
|
|
49737
|
+
if (dropCopy) {
|
|
49738
|
+
if (target.dropCopy) target.dropCopy.dispose();
|
|
49739
|
+
else target.dispose();
|
|
49740
|
+
}
|
|
49741
|
+
}
|
|
49742
|
+
});
|
|
49743
|
+
} else {
|
|
49744
|
+
dragObject.sca(dragObject.dropStartS);
|
|
49745
|
+
if (dropCopy && dragObject.dropCopy) {
|
|
49746
|
+
swapProperties("x", dragObject, dragObject.dropCopy);
|
|
49747
|
+
swapProperties("y", dragObject, dragObject.dropCopy);
|
|
49748
|
+
dragObject.dropCopy.mouse();
|
|
49749
|
+
}
|
|
49750
|
+
}
|
|
49751
|
+
|
|
49752
|
+
}
|
|
49753
|
+
}
|
|
49459
49754
|
if (obj.stage) obj.stage.update();
|
|
49460
49755
|
}
|
|
49461
49756
|
|
|
49757
|
+
|
|
49758
|
+
|
|
49462
49759
|
// the bounds check for registration inside the bounds
|
|
49463
49760
|
// or if surround is set for the whole object staying outside the bounds
|
|
49464
49761
|
function checkBounds(o, x, y) {
|
|
@@ -83519,7 +83816,6 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
|
|
|
83519
83816
|
canvas.releasePointerCapture(e.pointerId);
|
|
83520
83817
|
that.dispatchEvent(e);
|
|
83521
83818
|
});
|
|
83522
|
-
|
|
83523
83819
|
canvas.addEventListener("pointermove", function(e) {
|
|
83524
83820
|
that.dispatchEvent(e);
|
|
83525
83821
|
});
|
|
@@ -83547,10 +83843,10 @@ zim.Frame = function(scaling, width, height, color, outerColor, ready, assets, p
|
|
|
83547
83843
|
}
|
|
83548
83844
|
WW.removeEventListener("mousedown", leftEvent, true);
|
|
83549
83845
|
WW.removeEventListener("mousemove", leftEvent, true);
|
|
83550
|
-
WW.removeEventListener("
|
|
83846
|
+
WW.removeEventListener("mouseup", leftEvent);
|
|
83551
83847
|
WW.addEventListener("mousedown", leftEvent, true);
|
|
83552
83848
|
WW.addEventListener("mousemove", leftEvent, true); // tell actual mousemove there was a mouseup
|
|
83553
|
-
WW.addEventListener("
|
|
83849
|
+
WW.addEventListener("mouseup", leftEvent); // give actual mouseup a chance to act
|
|
83554
83850
|
}
|
|
83555
83851
|
|
|
83556
83852
|
function makeStage() {
|
|
@@ -167,8 +167,8 @@ declare namespace zim {
|
|
|
167
167
|
noTap(): this
|
|
168
168
|
hold(call: Function, distance?: number, time?: number, once?: boolean): this
|
|
169
169
|
noHold(): this
|
|
170
|
-
drag(config_or_boundary?: Boundary | createjs.Rectangle | { x: number, y: number, width: number, height: number } | DisplayObject, axis?: string, overCursor?: string, dragCursor?: string, all?: boolean, swipe?: boolean, localBoundary?: boolean, onTop?: boolean, surround?: boolean, slide?: boolean, slideFactor?: number, slideSnap?: boolean, slideSnapDamp?: number, reg?: boolean, removeTweens?: boolean, startBounds?: boolean, rect?: Boundary | createjs.Rectangle | { x: number, y: number, width: number, height: number }, currentTarget?: boolean): this
|
|
171
|
-
drag(config: { boundary?: Boundary | createjs.Rectangle | { x: number, y: number, width: number, height: number } | DisplayObject, axis?: string, overCursor?: string, dragCursor?: string, all?: boolean, swipe?: boolean, localBoundary?: boolean, onTop?: boolean, surround?: boolean, slide?: boolean, slideFactor?: number, slideSnap?: boolean, slideSnapDamp?: number, reg?: boolean, removeTweens?: boolean, startBounds?: boolean, rect?: Boundary | createjs.Rectangle | { x: number, y: number, width: number, height: number }, currentTarget?: boolean }): this
|
|
170
|
+
drag(config_or_boundary?: Boundary | createjs.Rectangle | { x: number, y: number, width: number, height: number } | DisplayObject, axis?: string, overCursor?: string, dragCursor?: string, all?: boolean, swipe?: boolean, localBoundary?: boolean, onTop?: boolean, surround?: boolean, slide?: boolean, slideFactor?: number, slideSnap?: boolean, slideSnapDamp?: number, reg?: boolean, removeTweens?: boolean, startBounds?: boolean, rect?: Boundary | createjs.Rectangle | { x: number, y: number, width: number, height: number }, currentTarget?: boolean, offStage?: boolean, immediateBoundary?: boolean, singleTouch?: boolean, dropTargets?: DisplayObject | [DisplayObject], dropCopy?: boolean, dropSnap?: boolean, dropBack?: boolean, dropEnd?: boolean, dropFull?: boolean, dropHitTest?: string, dropScale?: number, dropWidth?: number, dropHeight?: number): this
|
|
171
|
+
drag(config: { boundary?: Boundary | createjs.Rectangle | { x: number, y: number, width: number, height: number } | DisplayObject, axis?: string, overCursor?: string, dragCursor?: string, all?: boolean, swipe?: boolean, localBoundary?: boolean, onTop?: boolean, surround?: boolean, slide?: boolean, slideFactor?: number, slideSnap?: boolean, slideSnapDamp?: number, reg?: boolean, removeTweens?: boolean, startBounds?: boolean, rect?: Boundary | createjs.Rectangle | { x: number, y: number, width: number, height: number }, currentTarget?: boolean, offStage?: boolean, immediateBoundary?: boolean, singleTouch?: boolean, dropTargets?: DisplayObject | [DisplayObject], dropCopy?: boolean, dropSnap?: boolean, dropBack?: boolean, dropEnd?: boolean, dropFull?: boolean, dropHitTest?: string, dropScale?: number, dropWidth?: number, dropHeight?: number}): this
|
|
172
172
|
noDrag(): this
|
|
173
173
|
change(call: Function): this
|
|
174
174
|
dragBoundary(boundary: Boundary | createjs.Rectangle | { x: number, y: number, width: number, height: number }): this
|
|
@@ -1060,7 +1060,7 @@ declare namespace zim {
|
|
|
1060
1060
|
percentComplete: number
|
|
1061
1061
|
zimLastMouseEnabled: boolean
|
|
1062
1062
|
// END ZIM Display Interface
|
|
1063
|
-
run(time?: number, label?: string, call?: Function, params?: any, wait?: number | zimVee, waitedCall?: Function, waitedParams?: any, loop?: boolean, loopCount?: number | zimVee, loopWait?: number | zimVee, loopCall?: Function, loopParams?: any, loopWaitCall?: Function, loopWaitParams?: any, rewind?: boolean | zimVee, rewindWait?: number | zimVee, rewindCall?: Function, rewindParams?: any, rewindWaitCall?: Function, rewindWaitParams?: any, startFrame?: number, end?: number, tweek?: number, id?: string, globalControl?: boolean): this
|
|
1063
|
+
run(time?: number, label?: string, call?: Function, params?: any, wait?: number | zimVee, waitedCall?: Function, waitedParams?: any, loop?: boolean, loopCount?: number | zimVee, loopWait?: number | zimVee, loopCall?: Function, loopParams?: any, loopWaitCall?: Function, loopWaitParams?: any, rewind?: boolean | zimVee, rewindWait?: number | zimVee, rewindCall?: Function, rewindParams?: any, rewindWaitCall?: Function, rewindWaitParams?: any, startFrame?: number, frame?: number, end?: number, tweek?: number, id?: string, globalControl?: boolean): this
|
|
1064
1064
|
pauseRun(state?: boolean): this
|
|
1065
1065
|
stopRun(): this
|
|
1066
1066
|
hasProp(prop: string): boolean
|
|
@@ -2365,8 +2365,8 @@ declare namespace zim {
|
|
|
2365
2365
|
static LabelInput(config: { text?: string | zimVee, size?: number, maxLength?: number, password?: string, selectionColor?: color, selectionAlpha?: number, blinkerColor?: color, blinkerSpeed?: number, font?: string, color?: color, rollColor?: color, shadowColor?: color, shadowBlur?: number, align?: string, valign?: string, lineWidth?: number, lineHeight?: number, bold?: boolean, italic?: boolean, variant?: boolean, backing?: DisplayObject, outlineColor?: color, outlineWidth?: number, backgroundColor?: color, backgroundBorderColor?: color, backgroundBorderWidth?: number, corner?: number | any[], backgroundDashed?: boolean, padding?: number, paddingH?: number, paddingV?: number, shiftH?: number, shiftV?: number, rollPersist?: boolean, labelWidth?: number, labelHeight?: number, style?: boolean, group?: string, inherit?: {} }): Container
|
|
2366
2366
|
}
|
|
2367
2367
|
export class List extends zim.Window implements zimComponent {
|
|
2368
|
-
constructor(config_or_width?: number, height?: number, list?: any[], viewNum?: number, vertical?: boolean, currentSelected?: boolean, align?: string, valign?: string, labelAlign?: string, labelValign?: string, labelIndent?: number, labelIndentH?: boolean, labelIndentV?: boolean, indent?: number, spacing?: number, backgroundColor?: color, rollBackgroundColor?: color, downBackgroundColor?: color, selectedBackgroundColor?: color, backdropColor?: color, color?: color, rollColor?: color, downColor?: color, selectedColor?: color, borderColor?: color, borderWidth?: number, padding?: number, corner?: number | any[], swipe?: boolean, scrollBarActive?: boolean, scrollBarDrag?: boolean, scrollBarColor?: color, scrollBarAlpha?: number, scrollBarFade?: boolean, scrollBarH?: boolean, scrollBarV?: boolean, scrollBarOverlay?: boolean, slide?: boolean, slideFactor?: number, slideSnap?: boolean, slideSnapDamp?: number, shadowColor?: color, shadowBlur?: number, paddingH?: number, paddingV?: number, scrollWheel?: boolean, damp?: number, titleBar?: string | Label, titleBarColor?: color, titleBarBackgroundColor?: color, titleBarHeight?: number, draggable?: boolean, boundary?: {} | Boundary, onTop?: boolean, close?: boolean, closeColor?: color, excludeCustomTap?: boolean, organizer?: Organizer, checkBox?: boolean, pulldown?: boolean, clone?: boolean, cancelCurrentDrag?: boolean, index?: number, resizeHandle?: boolean, resizeBoundary?: Boundary, resizeVisible?: boolean, drop?: boolean, dropTargets?: [
|
|
2369
|
-
constructor(config: { width?: number, height?: number, list?: any[], viewNum?: number, vertical?: boolean, currentSelected?: boolean, align?: string, valign?: string, labelAlign?: string, labelValign?: string, labelIndent?: number, labelIndentH?: boolean, labelIndentV?: boolean, indent?: number, spacing?: number, backgroundColor?: color, rollBackgroundColor?: color, downBackgroundColor?: color, selectedBackgroundColor?: color, backdropColor?: color, color?: color, rollColor?: color, downColor?: color, selectedColor?: color, borderColor?: color, borderWidth?: number, padding?: number, corner?: number | any[], swipe?: boolean, scrollBarActive?: boolean, scrollBarDrag?: boolean, scrollBarColor?: color, scrollBarAlpha?: number, scrollBarFade?: boolean, scrollBarH?: boolean, scrollBarV?: boolean, scrollBarOverlay?: boolean, slide?: boolean, slideFactor?: number, slideSnap?: boolean, slideSnapDamp?: number, shadowColor?: color, shadowBlur?: number, paddingH?: number, paddingV?: number, scrollWheel?: boolean, damp?: number, titleBar?: string | Label, titleBarColor?: color, titleBarBackgroundColor?: color, titleBarHeight?: number, draggable?: boolean, boundary?: {} | Boundary, onTop?: boolean, close?: boolean, closeColor?: color, excludeCustomTap?: boolean, organizer?: Organizer, checkBox?: boolean, pulldown?: boolean, clone?: boolean, cancelCurrentDrag?: boolean, index?: number, resizeHandle?: boolean, resizeBoundary?: Boundary, resizeVisible?: boolean, drop?: boolean, dropTargets?: [
|
|
2368
|
+
constructor(config_or_width?: number, height?: number, list?: any[], viewNum?: number, vertical?: boolean, currentSelected?: boolean, align?: string, valign?: string, labelAlign?: string, labelValign?: string, labelIndent?: number, labelIndentH?: boolean, labelIndentV?: boolean, indent?: number, spacing?: number, backgroundColor?: color, rollBackgroundColor?: color, downBackgroundColor?: color, selectedBackgroundColor?: color, backdropColor?: color, color?: color, rollColor?: color, downColor?: color, selectedColor?: color, borderColor?: color, borderWidth?: number, padding?: number, corner?: number | any[], swipe?: boolean, scrollBarActive?: boolean, scrollBarDrag?: boolean, scrollBarColor?: color, scrollBarAlpha?: number, scrollBarFade?: boolean, scrollBarH?: boolean, scrollBarV?: boolean, scrollBarOverlay?: boolean, slide?: boolean, slideFactor?: number, slideSnap?: boolean, slideSnapDamp?: number, shadowColor?: color, shadowBlur?: number, paddingH?: number, paddingV?: number, scrollWheel?: boolean, damp?: number, titleBar?: string | Label, titleBarColor?: color, titleBarBackgroundColor?: color, titleBarHeight?: number, draggable?: boolean, boundary?: {} | Boundary, onTop?: boolean, close?: boolean, closeColor?: color, excludeCustomTap?: boolean, organizer?: Organizer, checkBox?: boolean, pulldown?: boolean, clone?: boolean, cancelCurrentDrag?: boolean, index?: number, resizeHandle?: boolean, resizeBoundary?: Boundary, resizeVisible?: boolean, drop?: boolean, dropTargets?: DisplayObject | [DisplayObject], dropSelf?: boolean, dropCopy?: boolean, dropColor?: color, dropThickness?: number, dropScrollSpeed?: number, dropReticleAlpha?: number, dropHitTest?: string, dropFull?: boolean, dropSnap?: boolean, dropEnd?: boolean, dropScale?: number, dropWidth?: number, dropHeight?: number, selectedIndex?: number, style?: boolean, group?: string, inherit?: {})
|
|
2369
|
+
constructor(config: { width?: number, height?: number, list?: any[], viewNum?: number, vertical?: boolean, currentSelected?: boolean, align?: string, valign?: string, labelAlign?: string, labelValign?: string, labelIndent?: number, labelIndentH?: boolean, labelIndentV?: boolean, indent?: number, spacing?: number, backgroundColor?: color, rollBackgroundColor?: color, downBackgroundColor?: color, selectedBackgroundColor?: color, backdropColor?: color, color?: color, rollColor?: color, downColor?: color, selectedColor?: color, borderColor?: color, borderWidth?: number, padding?: number, corner?: number | any[], swipe?: boolean, scrollBarActive?: boolean, scrollBarDrag?: boolean, scrollBarColor?: color, scrollBarAlpha?: number, scrollBarFade?: boolean, scrollBarH?: boolean, scrollBarV?: boolean, scrollBarOverlay?: boolean, slide?: boolean, slideFactor?: number, slideSnap?: boolean, slideSnapDamp?: number, shadowColor?: color, shadowBlur?: number, paddingH?: number, paddingV?: number, scrollWheel?: boolean, damp?: number, titleBar?: string | Label, titleBarColor?: color, titleBarBackgroundColor?: color, titleBarHeight?: number, draggable?: boolean, boundary?: {} | Boundary, onTop?: boolean, close?: boolean, closeColor?: color, excludeCustomTap?: boolean, organizer?: Organizer, checkBox?: boolean, pulldown?: boolean, clone?: boolean, cancelCurrentDrag?: boolean, index?: number, resizeHandle?: boolean, resizeBoundary?: Boundary, resizeVisible?: boolean, drop?: boolean, dropTargets?: DisplayObject | [DisplayObject], dropSelf?: boolean, dropCopy?: boolean, dropColor?: color, dropThickness?: number, dropScrollSpeed?: number, dropReticleAlpha?: number, dropHitTest?: string, dropFull?: boolean, dropSnap?: boolean, dropEnd?: boolean, dropScale?: number, dropWidth?: number, dropHeight?: number, selectedIndex?: number, style?: boolean, group?: string, inherit?: {} })
|
|
2370
2370
|
// ZIM Component Interface
|
|
2371
2371
|
// dispose():boolean // now added to Container, etc.
|
|
2372
2372
|
enabled: boolean
|