|
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:
351 bytes
|
| Rev | Line | |
|---|
| [e4c61dd] | 1 | import {get, set} from "./schedule.js";
|
|---|
| 2 |
|
|---|
| 3 | function easeConstant(id, value) {
|
|---|
| 4 | if (typeof value !== "function") throw new Error;
|
|---|
| 5 | return function() {
|
|---|
| 6 | set(this, id).ease = value;
|
|---|
| 7 | };
|
|---|
| 8 | }
|
|---|
| 9 |
|
|---|
| 10 | export default function(value) {
|
|---|
| 11 | var id = this._id;
|
|---|
| 12 |
|
|---|
| 13 | return arguments.length
|
|---|
| 14 | ? this.each(easeConstant(id, value))
|
|---|
| 15 | : get(this.node(), id).ease;
|
|---|
| 16 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.