Concerning the LzTrack.lzs changes:

-            if (reglist.length == 0) {
+            if (reglist.length === 0) {
I wouldn't go so far and use strict equality checks for number literals in this case.

And there is still one non-strict does-not-equals operator in __LZtopview()
        // nodeLevel is equal
        while (atemp.immediateparent != btemp.immediateparent) {
            atemp = atemp.immediateparent;
            btemp = btemp.immediateparent;
        }

Apart from that I'm fine with the changes for register(). For unregister() you may want to check "__LZuids" first and later break early from the loop after removing the array element.

if (reglist && reglist.__LZuids[v.__LZUID]) {
  delete reglist.__LZuids[v.__LZUID];
  for (...) {
    if (reglist[i] === v) {
       ....
       reglist.splice(i, 1);
       break; // no multiple entries possible, cf. register()
    }
  }
}




On 12/29/2010 7:38 PM, Max Carlson wrote:
Sending with the correct QA reviewer name...

Change maxcarlson-20101229-tsP by maxcarl...@friendly on 2010-12-29 09:42:25 PST
     in /Users/maxcarlson/openlaszlo/trunk-clean
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Add draggable and droppable mixins

Bugs Fixed: LPP-9591 - Add dragable and dropable mixin

Technical Reviewer: ptw
QA Reviewer: ffeng

Release Notes: New draggable and droppable mixins add seamless drag and drop 
capability to any view.

Overview: Adds draggable, droppable and a global dragmanager.

Details: LzTrack - Prevent duplicate registration for a given view/group.  == 
->  ===.

lzx-autoincludes - Add autoinclude entries for draggable and droppable mixins.

boxmodel - Remove explicit include from doc example, as it's no longer needed.

draggable/library - All dependencies for draggable/droppable

draggable - Implements the draggable mixin.  See the docs for how to use.

droppable - Implements the droppable mixin.  See the docs for how to use.

dragmanager - Tracks global drag state, delegates events to draggable and 
droppable instances.

Tests: Inline doc example and examples/draggable.lzx work consistently across 
all runtimes.

Files:
M       WEB-INF/lps/lfc/services/LzTrack.lzs
M       WEB-INF/lps/misc/lzx-autoincludes.properties
M       lps/components/mixins/boxmodel.lzx
A       lps/components/mixins/draggable
A       lps/components/mixins/draggable/library.lzx
A       lps/components/mixins/draggable/draggable.lzx
A       lps/components/mixins/draggable/dragmanager.lzx
A       lps/components/mixins/draggable/droppable.lzx
A       examples/draggable.lzx

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/maxcarlson-20101229-tsP.tar


Reply via email to