mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
9 lines
261 B
JavaScript
9 lines
261 B
JavaScript
d3.selection.prototype.one = function (type, listener, capture) {
|
|
var target = this, typeOnce = type + ".once";
|
|
function one() {
|
|
target.on(typeOnce, null);
|
|
listener.apply(this, arguments);
|
|
}
|
|
target.on(typeOnce, one, capture);
|
|
};
|