Scrambler overlap

I am encountering an issue where items on a scrambler don't move and when I drop the object it overlaps with one already there.

What version of ZIM?

  1. I recall it doing this before. It won't do it if I set swaplock to true.

When you change the num does the scrambler check the positions of the objects while it's scrambling? Maybe it's getting confused if you set num to 3. It cheks positions on each scramble and doesn't allow that object to then be moved because it's in the correct position?

I just found another issue with the scrambler locking if I click with the mouse too fast.

The locking even occurs with touch.

The issue doesn't appear to be present on ZIM 015.

Will take a look later. For now, can you test with a basic scrambler without keys, swapLock, etc.

There is no difference in the Scrambler code from 015 to 106. But drag() has some changes:

I had it on 14 with no options other than tile, keys and key property, was having issues when I moved to 16 that's when I tried other options but had same results. I just went back to 15 for now.

Hmmm... not that much different in the drag() either. Added a few preventDefault and stopImmediatePropagation calls. Added one if (e.stageX==null return. Do not think any of these would cause a regression.

Possibly something in animate as it goes back to its location. Can you please try using the template below. I have used the ZIM 015 amimate() inside the rest of the ZIM 016 to test if animate is the issue.

<!DOCTYPE html>
<meta charset="utf-8" />
<title>ZIM - Code Creativity</title>

<!-- - JavaScript Canvas Framework -->
<script src=""></script>
<script src=""></script>


// See Docs under Frame for FIT, FILL, FULL, and TAG
const frame = new Frame(FIT, 1024, 768, light, dark);
frame.on("ready", () => {

    const stage = frame.stage;
    let stageW = frame.width;
    let stageH = frame.height;

    // put your code here
    new Circle(100, purple)

}); // end ready

<meta name="viewport" content="width=device-width, user-scalable=no" />

That also causes it to freeze. ZIM 015 doesn't have any issues.

Okay - thanks for testing. We have uploaded a ZIM_docs3.js that has the drag() code and the animate() code from 015. Like I said, when we tested against the scrambler() code it was the same. Could you please switch to ZIM_docs3.js and see if that helps?

This also freezes it. ZIM015 doesn't freeze but it is out of alignment.

This example also doesn't work with ZIM016.

I am getting this error.

ZIM_min.js:7 Uncaught TypeError: Cannot read properties of undefined (reading 'addChild')
at Qo.wire (ZIM_min.js:7:592503)
at zob (ZIM_min.js:7:3689)
at Qo.wire (ZIM_min.js:7:591939)
at Qo.CheckBox.wire (ZIM_min.js:7:1008302)
at ready (script.js:312:80)
at ye (ZIM_min.js:7:950400)
at Qo.Queue. (ZIM_min.js:7:950182)
at createjs.js:30:3015
at e._dispatchEvent (createjs.js:30:4499)
at e._dispatchEvent (createjs.js:30:4567)

I tried the options above.