main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
888 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | exports.transformPath = exports.equalPath = void 0;
|
---|
| 4 | var equalPath = function (a, b) {
|
---|
| 5 | if (a.length === b.length) {
|
---|
| 6 | return a.some(function (v, i) { return v === b[i]; });
|
---|
| 7 | }
|
---|
| 8 | return false;
|
---|
| 9 | };
|
---|
| 10 | exports.equalPath = equalPath;
|
---|
| 11 | var transformPath = function (path, deltaX, deltaY, deltaW, deltaH) {
|
---|
| 12 | return path.map(function (point, index) {
|
---|
| 13 | switch (index) {
|
---|
| 14 | case 0:
|
---|
| 15 | return point.add(deltaX, deltaY);
|
---|
| 16 | case 1:
|
---|
| 17 | return point.add(deltaX + deltaW, deltaY);
|
---|
| 18 | case 2:
|
---|
| 19 | return point.add(deltaX + deltaW, deltaY + deltaH);
|
---|
| 20 | case 3:
|
---|
| 21 | return point.add(deltaX, deltaY + deltaH);
|
---|
| 22 | }
|
---|
| 23 | return point;
|
---|
| 24 | });
|
---|
| 25 | };
|
---|
| 26 | exports.transformPath = transformPath;
|
---|
| 27 | //# sourceMappingURL=path.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.