|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
755 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
|---|
| 4 | value: true
|
|---|
| 5 | });
|
|---|
| 6 | exports.default = _default;
|
|---|
| 7 | var _noop = _interopRequireDefault(require("../noop.js"));
|
|---|
| 8 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|---|
| 9 | function LinearClosed(context) {
|
|---|
| 10 | this._context = context;
|
|---|
| 11 | }
|
|---|
| 12 | LinearClosed.prototype = {
|
|---|
| 13 | areaStart: _noop.default,
|
|---|
| 14 | areaEnd: _noop.default,
|
|---|
| 15 | lineStart: function () {
|
|---|
| 16 | this._point = 0;
|
|---|
| 17 | },
|
|---|
| 18 | lineEnd: function () {
|
|---|
| 19 | if (this._point) this._context.closePath();
|
|---|
| 20 | },
|
|---|
| 21 | point: function (x, y) {
|
|---|
| 22 | x = +x, y = +y;
|
|---|
| 23 | if (this._point) this._context.lineTo(x, y);else this._point = 1, this._context.moveTo(x, y);
|
|---|
| 24 | }
|
|---|
| 25 | };
|
|---|
| 26 | function _default(context) {
|
|---|
| 27 | return new LinearClosed(context);
|
|---|
| 28 | } |
|---|
Note:
See
TracBrowser
for help on using the repository browser.