Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*!
  2. * VERSION: 0.6.1
  3. * DATE: 2018-08-27
  4. * UPDATES AND DOCS AT: http://greensock.com
  5. *
  6. * @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
  7. * This work is subject to the terms at http://greensock.com/standard-license or for
  8. * Club GreenSock members, the software agreement that was issued with your membership.
  9. *
  10. * @author: Jack Doyle, jack@greensock.com
  11. */
  12. /* eslint-disable */
  13. import { _gsScope } from "./TweenLite.js";
  14. export var AttrPlugin = _gsScope._gsDefine.plugin({
  15. propName: "attr",
  16. API: 2,
  17. version: "0.6.1",
  18. //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
  19. init: function(target, value, tween, index) {
  20. var p, end;
  21. if (typeof(target.setAttribute) !== "function") {
  22. return false;
  23. }
  24. for (p in value) {
  25. end = value[p];
  26. if (typeof(end) === "function") {
  27. end = end(index, target);
  28. }
  29. this._addTween(target, "setAttribute", target.getAttribute(p) + "", end + "", p, false, p);
  30. this._overwriteProps.push(p);
  31. }
  32. return true;
  33. }
  34. });
  35. export { AttrPlugin as default };