diff options
Diffstat (limited to 'src/helpers.js')
-rw-r--r-- | src/helpers.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/helpers.js b/src/helpers.js index 70f189f..3facb5d 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -60,6 +60,12 @@ function parseMatrix(matrix) { return matrix } +// Add centre point to transform object +function ensureCentre(o, target) { + o.cx = o.cx == null ? target.bbox().cx : o.cx + o.cy = o.cy == null ? target.bbox().cy : o.cy +} + // Convert string to matrix function stringToMatrix(source) { // remove matrix wrapper and split to individual numbers |