-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update d3-selection
- Loading branch information
Showing
11 changed files
with
1,505 additions
and
546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
export default function(x) { | ||
return function() { | ||
return x; | ||
}; | ||
} | ||
export default x => () => x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
export default function ZoomEvent(target, type, transform) { | ||
this.target = target; | ||
this.type = type; | ||
this.transform = transform; | ||
export default function ZoomEvent(type, { | ||
sourceEvent, | ||
target, | ||
transform, | ||
dispatch | ||
}) { | ||
Object.defineProperties(this, { | ||
type: {value: type, enumerable: true, configurable: true}, | ||
sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, | ||
target: {value: target, enumerable: true, configurable: true}, | ||
transform: {value: transform, enumerable: true, configurable: true}, | ||
_: {value: dispatch} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
import {event} from "d3-selection"; | ||
|
||
export function nopropagation() { | ||
export function nopropagation(event) { | ||
event.stopImmediatePropagation(); | ||
} | ||
|
||
export default function() { | ||
export default function(event) { | ||
event.preventDefault(); | ||
event.stopImmediatePropagation(); | ||
} |
Oops, something went wrong.