Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/multi instance behavior #281

Merged
merged 4 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Replace all identity identifiers with class identifiers. for ins…
…tance behavior
  • Loading branch information
jinwoo-kim-nhn committed Dec 2, 2019
commit b44c3586a2cfea0a7e65d84daae03ca96de301dc
2 changes: 1 addition & 1 deletion src/css/gridtable.styl
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
left: -5px;
td.dot.right-bottom:before
bottom: -5px;
right: -5px;
right: -5px;
1 change: 1 addition & 0 deletions src/js/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ export default {
this.stopDrawingMode();
this.ui.changeMenu('crop');
},
/* eslint-disable */
preset: presetType => {
switch (presetType) {
case 'preset-square':
Expand Down
10 changes: 5 additions & 5 deletions src/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ class Ui {
this._initMenuEvent = false;

this._els = {
'undo': this._menuElement.querySelector('#tie-btn-undo'),
'redo': this._menuElement.querySelector('#tie-btn-redo'),
'reset': this._menuElement.querySelector('#tie-btn-reset'),
'delete': this._menuElement.querySelector('#tie-btn-delete'),
'deleteAll': this._menuElement.querySelector('#tie-btn-delete-all'),
'undo': this._menuElement.querySelector('.tie-btn-undo'),
'redo': this._menuElement.querySelector('.tie-btn-redo'),
'reset': this._menuElement.querySelector('.tie-btn-reset'),
'delete': this._menuElement.querySelector('.tie-btn-delete'),
'deleteAll': this._menuElement.querySelector('.tie-btn-delete-all'),
'download': this._selectedElement.querySelectorAll('.tui-image-editor-download-btn'),
'load': this._selectedElement.querySelectorAll('.tui-image-editor-load-btn')
};
Expand Down
6 changes: 3 additions & 3 deletions src/js/ui/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class Draw extends Submenu {
this._els = {
lineSelectButton: this.selector('.tie-draw-line-select-button'),
drawColorpicker: new Colorpicker(
this.selector('#tie-draw-color'), '#00a9ff', this.toggleDirection, this.usageStatistics
this.selector('.tie-draw-color'), '#00a9ff', this.toggleDirection, this.usageStatistics
),
drawRange: new Range(this.selector('#tie-draw-range'), defaultDrawRangeValus),
drawRangeValue: this.selector('#tie-draw-range-value')
drawRange: new Range(this.selector('.tie-draw-range'), defaultDrawRangeValus),
drawRangeValue: this.selector('.tie-draw-range-value')
};

this.type = null;
Expand Down
2 changes: 1 addition & 1 deletion src/js/ui/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Icon extends Submenu {
registIconButton: this.selector('.tie-icon-image-file'),
addIconButton: this.selector('.tie-icon-add-button'),
iconColorpicker: new Colorpicker(
this.selector('#tie-icon-color'), '#ffbb3b', this.toggleDirection, this.usageStatistics
this.selector('.tie-icon-color'), '#ffbb3b', this.toggleDirection, this.usageStatistics
)
};
}
Expand Down
6 changes: 3 additions & 3 deletions src/js/ui/rotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class Rotate extends Submenu {
this._value = 0;

this._els = {
rotateButton: this.selector('#tie-retate-button'),
rotateRange: new Range(this.selector('#tie-rotate-range'), defaultRotateRangeValus),
rotateRangeValue: this.selector('#tie-ratate-range-value')
rotateButton: this.selector('.tie-retate-button'),
rotateRange: new Range(this.selector('.tie-rotate-range'), defaultRotateRangeValus),
rotateRangeValue: this.selector('.tie-ratate-range-value')
};
}

Expand Down
10 changes: 5 additions & 5 deletions src/js/ui/shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ class Shape extends Submenu {

this._els = {
shapeSelectButton: this.selector('.tie-shape-button'),
shapeColorButton: this.selector('#tie-shape-color-button'),
strokeRange: new Range(this.selector('#tie-stroke-range'), defaultShapeStrokeValus),
strokeRangeValue: this.selector('#tie-stroke-range-value'),
shapeColorButton: this.selector('.tie-shape-color-button'),
strokeRange: new Range(this.selector('.tie-stroke-range'), defaultShapeStrokeValus),
strokeRangeValue: this.selector('.tie-stroke-range-value'),
fillColorpicker: new Colorpicker(
this.selector('#tie-color-fill'), '', this.toggleDirection, this.usageStatistics
this.selector('.tie-color-fill'), '', this.toggleDirection, this.usageStatistics
),
strokeColorpicker: new Colorpicker(
this.selector('#tie-color-stroke'), '#ffbb3b', this.toggleDirection, this.usageStatistics
this.selector('.tie-color-stroke'), '#ffbb3b', this.toggleDirection, this.usageStatistics
)
};

Expand Down
10 changes: 5 additions & 5 deletions src/js/ui/template/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ export default ({locale, biImage, iconStyle: {normal, hover, disabled}, loadButt
<img src="${biImage}" />
</div>
<ul class="tui-image-editor-menu">
<li id="tie-btn-undo" class="tui-image-editor-item">
<li class="tie-btn-undo tui-image-editor-item">
<svg class="svg_ic-menu">
<use xlink:href="${normal.path}#${normal.name}-ic-undo" class="enabled"/>
<use xlink:href="${disabled.path}#${disabled.name}-ic-undo" class="normal"/>
<use xlink:href="${hover.path}#${hover.name}-ic-undo" class="hover"/>
</svg>
</li>
<li id="tie-btn-redo" class="tui-image-editor-item">
<li class="tie-btn-redo tui-image-editor-item">
<svg class="svg_ic-menu">
<use xlink:href="${normal.path}#${normal.name}-ic-redo" class="enabled"/>
<use xlink:href="${disabled.path}#${disabled.name}-ic-redo" class="normal"/>
<use xlink:href="${hover.path}#${hover.name}-ic-redo" class="hover"/>
</svg>
</li>
<li id="tie-btn-reset" class="tui-image-editor-item">
<li class="tie-btn-reset tui-image-editor-item">
<svg class="svg_ic-menu">
<use xlink:href="${normal.path}#${normal.name}-ic-reset" class="enabled"/>
<use xlink:href="${disabled.path}#${disabled.name}-ic-reset" class="normal"/>
Expand All @@ -28,14 +28,14 @@ export default ({locale, biImage, iconStyle: {normal, hover, disabled}, loadButt
<li class="tui-image-editor-item">
<div class="tui-image-editor-icpartition"></div>
</li>
<li id="tie-btn-delete" class="tui-image-editor-item">
<li class="tie-btn-delete tui-image-editor-item">
<svg class="svg_ic-menu">
<use xlink:href="${normal.path}#${normal.name}-ic-delete" class="enabled"/>
<use xlink:href="${disabled.path}#${disabled.name}-ic-delete" class="normal"/>
<use xlink:href="${hover.path}#${hover.name}-ic-delete" class="hover"/>
</svg>
</li>
<li id="tie-btn-delete-all" class="tui-image-editor-item">
<li class="tie-btn-delete-all tui-image-editor-item">
<svg class="svg_ic-menu">
<use xlink:href="${normal.path}#${normal.name}-ic-delete-all" class="enabled"/>
<use xlink:href="${disabled.path}#${disabled.name}-ic-delete-all" class="normal"/>
Expand Down
6 changes: 3 additions & 3 deletions src/js/ui/template/submenu/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export default ({locale, iconStyle: {normal, active}}) => (`
<div></div>
</li>
<li>
<div id="tie-draw-color" title="${locale.localize('Color')}"></div>
<div class="tie-draw-color" title="${locale.localize('Color')}"></div>
</li>
<li class="tui-image-editor-partition only-left-right">
<div></div>
</li>
<li class="tui-image-editor-newline tui-image-editor-range-wrap">
<label class="range">${locale.localize('Range')}</label>
<div id="tie-draw-range"></div>
<input id="tie-draw-range-value" class="tui-image-editor-range-value" value="0" />
<div class="tie-draw-range"></div>
<input class="tie-draw-range-value tui-image-editor-range-value" value="0" />
</li>
</ul>
`);
2 changes: 1 addition & 1 deletion src/js/ui/template/submenu/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default ({locale, iconStyle: {normal, active}}) => (`
<div></div>
</li>
<li>
<div id="tie-icon-color" title="${locale.localize('Color')}"></div>
<div class="tie-icon-color" title="${locale.localize('Color')}"></div>
</li>
</ul>
`);
6 changes: 3 additions & 3 deletions src/js/ui/template/submenu/rotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
export default ({locale, iconStyle: {normal, active}}) => (`
<ul class="tui-image-editor-submenu-item">
<li id="tie-retate-button">
<li class="tie-retate-button">
<div class="tui-image-editor-button clockwise">
<div>
<svg class="svg_ic-submenu">
Expand Down Expand Up @@ -35,8 +35,8 @@ export default ({locale, iconStyle: {normal, active}}) => (`
</li>
<li class="tui-image-editor-newline tui-image-editor-range-wrap">
<label class="range">${locale.localize('Range')}</label>
<div id="tie-rotate-range"></div>
<input id="tie-ratate-range-value" class="tui-image-editor-range-value" value="0" />
<div class="tie-rotate-range"></div>
<input class="tie-ratate-range-value tui-image-editor-range-value" value="0" />
</li>
</ul>
`);
10 changes: 5 additions & 5 deletions src/js/ui/template/submenu/shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ export default ({locale, iconStyle: {normal, active}}) => (`
<li class="tui-image-editor-partition">
<div></div>
</li>
<li id="tie-shape-color-button">
<div id="tie-color-fill" title="${locale.localize('Fill')}"></div>
<div id="tie-color-stroke" title="${locale.localize('Stroke')}"></div>
<li class="tie-shape-color-button">
<div class="tie-color-fill" title="${locale.localize('Fill')}"></div>
<div class="tie-color-stroke" title="${locale.localize('Stroke')}"></div>
</li>
<li class="tui-image-editor-partition only-left-right">
<div></div>
</li>
<li class="tui-image-editor-newline tui-image-editor-range-wrap">
<label class="range">${locale.localize('Stroke')}</label>
<div id="tie-stroke-range"></div>
<input id="tie-stroke-range-value" class="tui-image-editor-range-value" value="0" />
<div class="tie-stroke-range"></div>
<input class="tie-stroke-range-value tui-image-editor-range-value" value="0" />
</li>
</ul>
`);
6 changes: 3 additions & 3 deletions src/js/ui/template/submenu/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ export default ({locale, iconStyle: {normal, active}}) => (`
<div></div>
</li>
<li>
<div id="tie-text-color" title="${locale.localize('Color')}"></div>
<div class="tie-text-color" title="${locale.localize('Color')}"></div>
</li>
<li class="tui-image-editor-partition only-left-right">
<div></div>
</li>
<li class="tui-image-editor-newline tui-image-editor-range-wrap">
<label class="range">${locale.localize('Text size')}</label>
<div id="tie-text-range"></div>
<input id="tie-text-range-value" class="tui-image-editor-range-value" value="0" />
<div class="tie-text-range"></div>
<input class="tie-text-range-value tui-image-editor-range-value" value="0" />
</li>
</ul>
`);
6 changes: 3 additions & 3 deletions src/js/ui/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ class Text extends Submenu {
textEffectButton: this.selector('.tie-text-effect-button'),
textAlignButton: this.selector('.tie-text-align-button'),
textColorpicker: new Colorpicker(
this.selector('#tie-text-color'), '#ffbb3b', this.toggleDirection, this.usageStatistics
this.selector('.tie-text-color'), '#ffbb3b', this.toggleDirection, this.usageStatistics
),
textRange: new Range(this.selector('#tie-text-range'), defaultTextRangeValus),
textRangeValue: this.selector('#tie-text-range-value')
textRange: new Range(this.selector('.tie-text-range'), defaultTextRangeValus),
textRangeValue: this.selector('.tie-text-range-value')
};
}

Expand Down