Custom Query (18300 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (109 - 111 of 18300)

Ticket Resolution Summary Owner Reporter
#146 fixed Compressor does not handle nested functions with identical parameter names correctly anonymous [email protected]
Description

The compressor/ShrinkSafe does not seem to handle nested functions that have identical parameter names in both the inner and function outer functions.

The simplest example is probably:

function(foo) {
    function(foo) {};
    foo;
};

which generates:

function(_1){
function(_1){
}
foo;
}

Notice how the reference to foo in the body of the outer function does not get converted and the parameters of both functions get the same replacement value _1.

This is the actual piece of code with which I first noticed the problem:

OLPanTool.prototype.handleMapMouseDown = function(event, map) {
    var pt = event.getCursorPosition();
    map.startPan(pt.x,pt.y);
    
    var realThis = this;

    OLWindowManager.getDocument().addEventListener('mousemove',
                                       function(event) {
                                           return realThis.drag(event, map);
                                       });

    OLWindowManager.getDocument().addEventListener('mouseup',
                                       function(event) {
                                           return realThis.release(event, map);
                                       });

    OLWindowManager.getDocument().addEventListener('mouseout',
                                       function(event) {   
                                           if (!event.getRelatedTarget()) {
                                               return realThis.release(event,
                                                                       map);
                                           }
                                       });

    map.setMapCursor(OLWindowManager.DRAGGING_CURSOR);
    event.stopPropagation();
};

#147 fixed insertAtIndex is confusing anonymous david
Description

the function signature for dojo.dom.insertAtIndex is as follows:

dojo.dom.insertAtIndex(node, ref, insertionIndex);

The problem is that ref isnt the node we want to insert the node within, rather, it is a node within a node that we want to put node in (confusing, I know). I think we need to change this so that ref is the containing node that node should be placed in. This is useful for inserting at position 0 on what may or may not be an empty containing node and not force the user to reference some random child node as ref. So, instead of having this:

dojo.dom.insertAtIndex(node, ref.firstChild, 7); // what if ref.firstChild is null?

We end up with:

dojo.dom.insertAtIndex(node, ref, 7);

It's cleaner, intuitive, and even mows the lawn!

#149 fixed Code comments say not to invoke methods on dojo.hostenv, but dojo.hostenv.setModulePrefix is not aliased alex [email protected]
Note: See TracQuery for help on using queries.