Skip to content

Commit 4d7916a

Browse files
authored
Delete dashArray and onDashArray from mode-tools.jsx
1 parent ea80642 commit 4d7916a

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

src/containers/mode-tools.jsx

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -159,34 +159,6 @@ class ModeTools extends React.Component {
159159
this.props.onUpdateImage();
160160
}
161161
}
162-
getDashArray () {
163-
const selectedItems = getSelectedLeafItems();
164-
if (selectedItems.length === 0) {
165-
return [];
166-
}
167-
const firstStyle = selectedItems[0].getStyle().getDashArray();
168-
for (const item of selectedItems) {
169-
if (item.getStyle().getDashArray().join(' ') !== firstStyle.join(' ')) {
170-
return [];
171-
}
172-
}
173-
return firstStyle;
174-
}
175-
handleDashArray (value) {
176-
let changed;
177-
const selectedItems = getSelectedLeafItems();
178-
for (const item of selectedItems) {
179-
const styles = item.getStyle();
180-
if (styles.getDashArray().join(' ') !== value.join(' ')) {
181-
styles.setDashArray(value);
182-
changed = true;
183-
}
184-
}
185-
if (changed) {
186-
this.props.setSelectedItems(this.props.format);
187-
this.props.onUpdateImage();
188-
}
189-
}
190162
hasSelectedRoundEnds () {
191163
const selectedItems = getSelectedLeafItems();
192164
for (const item of selectedItems) {
@@ -474,8 +446,6 @@ class ModeTools extends React.Component {
474446
onPointPoints={this.handlePointPoints}
475447
onUpdateImage={this.props.onUpdateImage}
476448

477-
dashArray={this.getDashArray()}
478-
onDashArray={this.handleDashArray}
479449
hasSelectedRoundEnds={this.hasSelectedRoundEnds()}
480450
hasSelectedSquareEnds={this.hasSelectedSquareEnds()}
481451
onRoundEnds={this.handleRoundEnds}

0 commit comments

Comments
 (0)