-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
branch for codereview #36
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,5 +123,85 @@ module.exports = { | |
unsupportedType: 'Unsupported object type', | ||
noObject: 'The object is not in canvas.', | ||
addedObject: 'The object is already added.' | ||
}, | ||
|
||
/** | ||
* Default icon menu svg path | ||
* @type {Object.<string, string>} | ||
*/ | ||
defaultIconPath: { | ||
'icon-arrow': 'M40 12V0l24 24-24 24V36H0V12h40z', | ||
'icon-arrow-2': 'M49,32 H3 V22 h46 l-18,-18 h12 l23,23 L43,50 h-12 l18,-18 z ', | ||
'icon-arrow-3': 'M43.349998,27 L17.354,53 H1.949999 l25.996,-26 L1.949999,1 h15.404 L43.349998,27 z ', | ||
'icon-star': 'M35,54.557999 l-19.912001,10.468 l3.804,-22.172001 l-16.108,-15.7 l22.26,-3.236 L35,3.746 l9.956,20.172001 l22.26,3.236 l-16.108,15.7 l3.804,22.172001 z ', | ||
'icon-star-2': 'M17,31.212 l-7.194,4.08 l-4.728,-6.83 l-8.234,0.524 l-1.328,-8.226 l-7.644,-3.14 l2.338,-7.992 l-5.54,-6.18 l5.54,-6.176 l-2.338,-7.994 l7.644,-3.138 l1.328,-8.226 l8.234,0.522 l4.728,-6.83 L17,-24.312 l7.194,-4.08 l4.728,6.83 l8.234,-0.522 l1.328,8.226 l7.644,3.14 l-2.338,7.992 l5.54,6.178 l-5.54,6.178 l2.338,7.992 l-7.644,3.14 l-1.328,8.226 l-8.234,-0.524 l-4.728,6.83 z ', | ||
'icon-polygon': 'M3,31 L19,3 h32 l16,28 l-16,28 H19 z ', | ||
'icon-location': 'M24 62C8 45.503 0 32.837 0 24 0 10.745 10.745 0 24 0s24 10.745 24 24c0 8.837-8 21.503-24 38zm0-28c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10z', | ||
'icon-heart': 'M49.994999,91.349998 l-6.96,-6.333 C18.324001,62.606995 2.01,47.829002 2.01,29.690998 C2.01,14.912998 13.619999,3.299999 28.401001,3.299999 c8.349,0 16.362,5.859 21.594,12 c5.229,-6.141 13.242001,-12 21.591,-12 c14.778,0 26.390999,11.61 26.390999,26.390999 c0,18.138 -16.314001,32.916 -41.025002,55.374001 l-6.96,6.285 z ', | ||
'icon-bubble': 'M44 48L34 58V48H12C5.373 48 0 42.627 0 36V12C0 5.373 5.373 0 12 0h40c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12h-8z' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 프로퍼티들 대문자로 사용해야 하지 않을까요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. svg같은데 꼭 자바스크립트에 있어야 하나요? css에 있는 것이 어울리는데. |
||
}, | ||
|
||
defaultRotateRangeValus: { | ||
min: -360, | ||
max: 360, | ||
value: 0, | ||
realTimeEvent: true | ||
}, | ||
|
||
defaultDrawRangeValus: { | ||
min: 5, | ||
max: 30, | ||
value: 12 | ||
}, | ||
|
||
defaultShapeStrokeValus: { | ||
realTimeEvent: true, | ||
min: 0, | ||
max: 300, | ||
value: 3 | ||
}, | ||
|
||
defaultTextRangeValus: { | ||
min: 10, | ||
max: 100, | ||
value: 50 | ||
}, | ||
|
||
defaultFilterRangeValus: { | ||
removewhiteThresholdRange: { | ||
min: 0, | ||
max: 255, | ||
value: 60 | ||
}, | ||
removewhiteDistanceRange: { | ||
min: 0, | ||
max: 255, | ||
value: 10 | ||
}, | ||
gradientTransparencyRange: { | ||
min: 0, | ||
max: 255, | ||
value: 100 | ||
}, | ||
brightnessRange: { | ||
min: -255, | ||
max: 255, | ||
value: 100 | ||
}, | ||
noiseRange: { | ||
min: 0, | ||
max: 1000, | ||
value: 100 | ||
}, | ||
pixelateRange: { | ||
min: 2, | ||
max: 20, | ||
value: 4 | ||
}, | ||
colorfilterThresholeRange: { | ||
min: 0, | ||
max: 255, | ||
value: 45 | ||
} | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -292,6 +292,10 @@ class Graphics { | |
this._canvas.setActiveObject(target); | ||
} | ||
|
||
/** | ||
* Set Crop selection style | ||
* @param {Object} style - Selection styles | ||
*/ | ||
setCropSelectionStyle(style) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이건 퍼블릭 메서드인가요? 주석이 빠졌네요. |
||
this.cropSelectionStyle = style; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
import snippet from 'tui-code-snippet'; | ||
import Promise from 'core-js/library/es6/promise'; | ||
import Invoker from './invoker'; | ||
import Ui from './ui'; | ||
import UI from './ui'; | ||
import action from './action'; | ||
import commandFactory from './factory/command'; | ||
import Graphics from './graphics'; | ||
|
@@ -29,18 +29,20 @@ const {isUndefined, forEach, CustomEvents} = snippet; | |
class ImageEditor { | ||
constructor(wrapper, option) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이번에 정리하는김에.. |
||
option = snippet.extend({ | ||
includeUi: false, | ||
includeUI: false, | ||
applyCropSelectionStyle: false, | ||
usageStatistics: true | ||
}, option); | ||
|
||
this.activeObjectId = null; | ||
|
||
/** | ||
* Ui instance | ||
* UI instance | ||
* @type {Ui} | ||
*/ | ||
this.ui = option.includeUi ? new Ui(wrapper, option.includeUi, this.getActions()) : null; | ||
if (option.includeUI) { | ||
this.ui = new UI(wrapper, option.includeUI, this.getActions()); | ||
} | ||
|
||
/** | ||
* Invoker | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건
false
말고null
이 들어가는게 맞을 것 같아요.