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

Feat/design ui useable #38

Merged
merged 37 commits into from
Jun 20, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4d12fd3
feat: ui improvement start
jinwoo-kim-nhn Jun 8, 2018
6bede58
feat: shape, draw menu Improved usability.
jinwoo-kim-nhn Jun 11, 2018
2e070e8
middle commit
jinwoo-kim-nhn Jun 11, 2018
a65c61b
add icon add with resize
Jun 11, 2018
9c9f738
icon useable resize icon
Jun 11, 2018
3cff2e4
complete icon menu useable
jinwoo-kim-nhn Jun 12, 2018
694ba62
middle commit
jinwoo-kim-nhn Jun 12, 2018
322a05b
middle commit2
Jun 12, 2018
d8d25f5
fixed middlecommit 3
Jun 12, 2018
59f5b5d
fixed bug all
Jun 13, 2018
504fe05
refactoring icon action
Jun 13, 2018
80b3045
feat: group selction style & action for ui usable
jinwoo-kim-nhn Jun 14, 2018
9aa3f67
fixed: shape stroke limit maxsize
jinwoo-kim-nhn Jun 14, 2018
959258c
fixed: submenu transition and mask apply hidden
Jun 14, 2018
d46b595
fixed crop zone bug
Jun 14, 2018
58be310
fixed action test
Jun 14, 2018
5cd6b06
added big menu tooltip
jinwoo-kim-nhn Jun 15, 2018
ebc9292
crop zone Flicker removal.
jinwoo-kim-nhn Jun 15, 2018
cf932dd
fixed shape standard mode
jinwoo-kim-nhn Jun 15, 2018
e5792cd
fixed shpae change stanbymode bug and filter partition height
jinwoo-kim-nhn Jun 15, 2018
3a41377
added iconsize theme
jinwoo-kim-nhn Jun 15, 2018
6d0cc9b
add jsdoc
jinwoo-kim-nhn Jun 15, 2018
f7a650d
add jsdoc & editor-wrap style
jinwoo-kim-nhn Jun 15, 2018
0527890
add test code job - 1
jinwoo-kim-nhn Jun 15, 2018
f065c12
feat: design - ui useable - add test all
Jun 17, 2018
8f3ae35
fixed undo stack bug
Jun 17, 2018
866158c
broken test fixed
jinwoo-kim-nhn Jun 18, 2018
ba1e4f4
fixed broken test2
jinwoo-kim-nhn Jun 18, 2018
4ed8c4b
fixed broken test 3
jinwoo-kim-nhn Jun 18, 2018
040766a
fixed broken test - 4
jinwoo-kim-nhn Jun 18, 2018
140530c
apply ui review
Jun 18, 2018
e05f58f
fixed: added file cleanup and theme properties.
jinwoo-kim-nhn Jun 19, 2018
c9e429b
fixed typpo
jinwoo-kim-nhn Jun 19, 2018
5368e6e
apply codereview
jinwoo-kim-nhn Jun 19, 2018
80bad1f
add sample bg file
jinwoo-kim-nhn Jun 19, 2018
9b51ae1
fixed broken test
jinwoo-kim-nhn Jun 19, 2018
60d64da
apply codereview
jinwoo-kim-nhn Jun 20, 2018
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
fixed undo stack bug
  • Loading branch information
jinwoo-kim-nhn authored and jinwoo-kim-nhn committed Jun 17, 2018
commit 8f3ae355a05a4b3fe598570b0102b343b43a56c2
5 changes: 4 additions & 1 deletion src/js/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ export default {
this.off('mousedown');
this.ui.icon.clearIconType();
this.changeSelectableAll(true);
this.cancelAddIcon();
this.changeCursor('default');
},
registDefalutIcons: (type, path) => {
Expand Down Expand Up @@ -422,11 +421,14 @@ export default {
fill: this.ui.text.textColor,
fontSize: util.toInteger(this.ui.text.fontSize)
}
}).then(() => {
this.changeCursor('default');
});
},
addObjectAfter: obj => {
if (['rect', 'circle', 'triangle'].indexOf(obj.type) > -1) {
this.ui.shape.setMaxStrokeValue(Math.min(obj.width, obj.height));
this.ui.shape.changeStandbyMode();
}
},
objectScaled: obj => {
Expand All @@ -445,6 +447,7 @@ export default {
}
},
selectionCleared: () => {
this.activeObjectId = null;
if (this.ui.submenu !== 'draw' && this.ui.submenu !== 'crop') {
this.stopDrawingMode();
}
Expand Down
2 changes: 0 additions & 2 deletions src/js/ui/shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ export default class Shape extends Submenu {
* @param {string} fillColor - fill color
*/
setShapeStatus({strokeWidth, strokeColor, fillColor}) {
this.changeStandbyMode();

this._els.strokeRange.value = strokeWidth;
this._els.strokeRange.trigger('change');

Expand Down
8 changes: 7 additions & 1 deletion test/action.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,11 @@ describe('Ui', () => {

describe('addText', () => {
it('When addText occurs, the addText () method should be executed.', () => {
spyOn(imageEditorMock, 'addText');
const promise = new Promise(resolve => {
resolve(300);
});

spyOn(imageEditorMock, 'addText').and.returnValue(promise);
imageEditorMock.fire('addText', {
x: 10,
y: 10
Expand All @@ -470,13 +474,15 @@ describe('Ui', () => {
describe('addObjectAfter', () => {
it('When addObjectAfter occurs, the shape\'s maxStrokeValue should be changed to match the size of the added object.', () => {
spyOn(imageEditorMock.ui.shape, 'setMaxStrokeValue');
spyOn(imageEditorMock.ui.shape, 'changeStandbyMode');
imageEditorMock.fire('addObjectAfter', {
type: 'circle',
width: 100,
height: 200
});

expect(imageEditorMock.ui.shape.setMaxStrokeValue.calls.mostRecent().args[0]).toBe(100);
expect(imageEditorMock.ui.shape.changeStandbyMode).toHaveBeenCalled();
});
});

Expand Down