SGradientStop.js 741 B

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.SGradientStop = void 0;
  4. var SGradientStop = (function () {
  5. function SGradientStop(pos, color) {
  6. this._pos = 0;
  7. this.pos = pos;
  8. this.color = color;
  9. }
  10. Object.defineProperty(SGradientStop.prototype, "pos", {
  11. get: function () {
  12. return this._pos;
  13. },
  14. set: function (value) {
  15. if (value < 0) {
  16. value = 0;
  17. }
  18. if (value > 1) {
  19. value = 1;
  20. }
  21. this._pos = value;
  22. },
  23. enumerable: false,
  24. configurable: true
  25. });
  26. return SGradientStop;
  27. }());
  28. exports.SGradientStop = SGradientStop;