Skip to content

Commit

Permalink
use transformsEnabled="position"
Browse files Browse the repository at this point in the history
  • Loading branch information
ejarzo committed Apr 2, 2019
1 parent 72f5e4b commit 9cf3a64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Shape/Component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class ShapeComponent extends React.Component {
<Circle
ref={c => (this.animCircle = c)}
hitGraphEnabled={false}
transformsEnabled="position"
x={-999}
y={-999}
radius={6}
Expand All @@ -153,6 +154,7 @@ class ShapeComponent extends React.Component {
onDragStart={handleDragStart}
onDragEnd={handleDragEnd}
opacity={attrs.opacity}
transformsEnabled="position"
>
{/* shape perimeter */}
<Line
Expand All @@ -168,6 +170,7 @@ class ShapeComponent extends React.Component {
onMouseDown={handleMouseDown}
onMouseOver={handleMouseOver}
onMouseOut={handleMouseOut}
transformsEnabled="position"
/>

{/* shape verteces */}
Expand Down Expand Up @@ -246,10 +249,12 @@ class ShapeComponent extends React.Component {
hitGraphEnabled={false}
draggable={false}
opacity={attrs.opacity}
transformsEnabled="position"
>
<Line
ref={c => (this.shapeElement = c)}
strokeScaleEnabled={false}
transformsEnabled="position"
points={points}
fill={attrs.fill}
lineJoin="miter"
Expand Down
4 changes: 4 additions & 0 deletions src/components/ShapeCanvas/PhantomShape/Component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function PhantomShapeComponent(props) {
stroke={props.color}
strokeWidth={strokeWidth}
fill={props.color}
transformsEnabled="position"
/>
);

Expand All @@ -40,6 +41,7 @@ function PhantomShapeComponent(props) {
<Group>
<Circle // circle beneath cursor
x={props.mousePos.x}
transformsEnabled="position"
y={props.mousePos.y}
radius={radius}
fill={props.color}
Expand All @@ -57,6 +59,7 @@ function PhantomShapeComponent(props) {
.toString()}
fillEnabled={true}
closed={props.drawingState === 'preview'}
transformsEnabled="position"
/>
<Line // line from previous point to cursor
points={props.points
Expand All @@ -65,6 +68,7 @@ function PhantomShapeComponent(props) {
strokeWidth={strokeWidth}
stroke={props.color}
opacity={0.5}
transformsEnabled="position"
/>
</Group>
)
Expand Down

0 comments on commit 9cf3a64

Please sign in to comment.