source: node_modules/d3-transition/src/transition/duration.js@ a762898

Last change on this file since a762898 was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 531 bytes
RevLine 
[e4c61dd]1import {get, set} from "./schedule.js";
2
3function durationFunction(id, value) {
4 return function() {
5 set(this, id).duration = +value.apply(this, arguments);
6 };
7}
8
9function durationConstant(id, value) {
10 return value = +value, function() {
11 set(this, id).duration = value;
12 };
13}
14
15export default function(value) {
16 var id = this._id;
17
18 return arguments.length
19 ? this.each((typeof value === "function"
20 ? durationFunction
21 : durationConstant)(id, value))
22 : get(this.node(), id).duration;
23}
Note: See TracBrowser for help on using the repository browser.