Changeset 6038
- Timestamp:
- 02/07/08 17:29:05 (1 year ago)
- Files:
-
- sandbox/tschaub/events/lib/OpenLayers/Events.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/tschaub/events/lib/OpenLayers/Events.js
r5614 r6038 594 594 * type - {String} 595 595 * evt - {Event} 596 * args - {Array} Optional array of arguments to call the listener with.597 596 * 598 597 * Returns: … … 600 599 * chain of listeners will stop getting called. 601 600 */ 602 triggerEvent: function (type, evt , args) {601 triggerEvent: function (type, evt) { 603 602 604 603 // prep evt object with object & div references … … 608 607 evt.object = this.object; 609 608 evt.element = this.element; 610 611 if(!args) { 612 args = [evt]; 613 } else { 614 args.unshift(evt); 615 } 616 609 617 610 // execute all callbacks registered for specified type 618 611 // get a clone of the listeners array to … … 625 618 var callback = listeners[i]; 626 619 // bind the context to callback.obj 627 continueChain = callback.func.apply(callback.obj, args);620 continueChain = callback.func.apply(callback.obj, [evt]); 628 621 629 622 if ((continueChain != undefined) && (continueChain == false)) {
