diff --git a/src/client/splitters/Spine.js b/src/client/splitters/Spine.js index d5846e7..8eda99b 100644 --- a/src/client/splitters/Spine.js +++ b/src/client/splitters/Spine.js @@ -96,6 +96,10 @@ class Spine extends Splitter { static get type() { return 'Spine'; } + + static get inverseRotation() { + return true; + } } export default Spine; \ No newline at end of file diff --git a/src/client/splitters/Splitter.js b/src/client/splitters/Splitter.js index 401e2f7..7f9ffa6 100644 --- a/src/client/splitters/Splitter.js +++ b/src/client/splitters/Splitter.js @@ -17,6 +17,10 @@ class Splitter { return name; } + + static get inverseRotation() { + return false; + } } export default Splitter; \ No newline at end of file diff --git a/src/client/ui/SheetSplitter.jsx b/src/client/ui/SheetSplitter.jsx index e27ee6f..2a4cfbd 100644 --- a/src/client/ui/SheetSplitter.jsx +++ b/src/client/ui/SheetSplitter.jsx @@ -71,7 +71,7 @@ class SheetSplitter extends React.Component { ctx.save(); ctx.translate(item.spriteSourceSize.x + item.spriteSourceSize.w/2, item.spriteSourceSize.y + item.spriteSourceSize.h/2); - ctx.rotate(-Math.PI/2); + ctx.rotate(this.state.splitter.inverseRotation ? Math.PI/2 : -Math.PI/2); let dx = trimmed ? item.spriteSourceSize.y - item.spriteSourceSize.h/2 : -item.spriteSourceSize.h/2; let dy = trimmed ? -(item.spriteSourceSize.x + item.spriteSourceSize.w/2) : -item.spriteSourceSize.w/2;