For controls with multiple handlers, we now tack them on to a handlers object. The base destroy takes care of the handlers. r=crschmidt,uz/2 (closes #1338)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6106 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -172,7 +172,7 @@
|
||||
control.handleKeypress(dKey);
|
||||
|
||||
// now make sure nothing happens if the vertex is mid-drag
|
||||
control.dragControl.dragHandler.dragging = true;
|
||||
control.dragControl.handlers.drag.dragging = true;
|
||||
control.handleKeypress(delKey);
|
||||
|
||||
// reset modified methods
|
||||
@@ -305,11 +305,11 @@
|
||||
control.dragControl.map.div = {};
|
||||
control.dragControl.map.div.style = {};
|
||||
control.dragControl.map.div.cursor = "foo";
|
||||
control.dragControl.dragHandler.deactivate = function() {
|
||||
control.dragControl.handlers.drag.deactivate = function() {
|
||||
this.active = false;
|
||||
}
|
||||
control.resetVertices();
|
||||
t.ok(!control.dragControl.dragHandler.active, "resetVertices deactivates drag handler");
|
||||
t.ok(!control.dragControl.handlers.drag.active, "resetVertices deactivates drag handler");
|
||||
control.dragControl.map = null;
|
||||
|
||||
control.destroy();
|
||||
|
||||
Reference in New Issue
Block a user