@@ -8,7 +8,7 @@ import ColorStyleProptype from '../lib/color-style-proptype';
88import { clearSelection } from '../helper/selection' ;
99import { endPointHit , touching } from '../helper/snapping' ;
1010import { drawHitPoint , removeHitPoint } from '../helper/guides' ;
11- import { stylePath } from '../helper/style-path' ;
11+ import { styleShape } from '../helper/style-path' ;
1212import { changeStrokeColor , clearStrokeGradient } from '../reducers/stroke-style' ;
1313import { changeStrokeWidth } from '../reducers/stroke-width' ;
1414import { changeMode } from '../reducers/modes' ;
@@ -103,7 +103,11 @@ class LineMode extends React.Component {
103103 this . hitResult = endPointHit ( event . point , LineMode . SNAP_TOLERANCE ) ;
104104 if ( this . hitResult ) {
105105 this . path = this . hitResult . path ;
106- stylePath ( this . path , this . props . colorState . strokeColor . primary , this . props . colorState . strokeWidth ) ;
106+ styleShape ( this . path , {
107+ fillColor : null ,
108+ strokeColor : this . props . colorState . strokeColor ,
109+ strokeWidth : this . props . colorState . strokeWidth
110+ } ) ;
107111 if ( this . hitResult . isFirst ) {
108112 this . path . reverse ( ) ;
109113 }
@@ -116,7 +120,11 @@ class LineMode extends React.Component {
116120 if ( ! this . path ) {
117121 this . path = new paper . Path ( ) ;
118122 this . path . strokeCap = 'round' ;
119- stylePath ( this . path , this . props . colorState . strokeColor . primary , this . props . colorState . strokeWidth ) ;
123+ styleShape ( this . path , {
124+ fillColor : null ,
125+ strokeColor : this . props . colorState . strokeColor ,
126+ strokeWidth : this . props . colorState . strokeWidth
127+ } ) ;
120128
121129 this . path . add ( event . point ) ;
122130 this . path . add ( event . point ) ; // Add second point, which is what will move when dragged
@@ -188,6 +196,12 @@ class LineMode extends React.Component {
188196 } else {
189197 this . path . lastSegment . point = endPoint ;
190198 }
199+
200+ styleShape ( this . path , {
201+ fillColor : null ,
202+ strokeColor : this . props . colorState . strokeColor ,
203+ strokeWidth : this . props . colorState . strokeWidth
204+ } ) ;
191205 }
192206 onMouseUp ( event ) {
193207 if ( event . event . button > 0 || ! this . active ) return ; // only first mouse button
@@ -227,6 +241,12 @@ class LineMode extends React.Component {
227241 this . hitResult = null ;
228242 }
229243
244+ styleShape ( this . path , {
245+ fillColor : null ,
246+ strokeColor : this . props . colorState . strokeColor ,
247+ strokeWidth : this . props . colorState . strokeWidth
248+ } ) ;
249+
230250 if ( this . path ) {
231251 this . props . onUpdateImage ( ) ;
232252 this . path = null ;
0 commit comments