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

chore: document for svg icon setting #348

Merged
merged 11 commits into from
Mar 6, 2020
Prev Previous commit
Next Next commit
apply codereview
  • Loading branch information
jinwoo-kim-nhn committed Mar 4, 2020
commit c5e2cd7d0316e975ae6c82fa28888c903a4ce5ab
8 changes: 4 additions & 4 deletions docs/Basic-Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ In the image below, the red and blue areas are set using the svg icon.
* This is the default setting for Image Editor.
* It's easy to change the color to match the icon state as shown below, but it uses the built-in default shape so you can't change the icon's appearance.
```js
var instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
const instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
includeUI: {
...
theme: {
Expand All @@ -66,12 +66,12 @@ In the image below, the red and blue areas are set using the svg icon.
});
```

2. There is a way to use the **actual physical svg file** and **set the file location manually**.
2. There is a way to use the **your svg file** and **set the file location manually**.
* This is used when you want to completely reconfigure the svg icon itself rather than the built-in icon.
* The disadvantage is that the color must be set by modifying the svg file directly.
* Need to set the path and name for each icon state as shown below.
```js
var instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
const instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
includeUI: {
...
theme: {
Expand Down Expand Up @@ -129,7 +129,7 @@ var locale_ru_RU = { // override default English locale to your custom
// etc...
};
// Image editor
var instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
const instance = new ImageEditor(document.querySelector('#tui-image-editor'), {
includeUI: {
loadImage: {
path: 'img/sampleImage.jpg',
Expand Down
14 changes: 0 additions & 14 deletions src/js/ui/theme/standard.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,6 @@
'submenu.normalIcon.color': '#8a8a8a',
'submenu.activeIcon.color': '#e9e9e9',

// icons (svg icon file setting)
// 'menu.normalIcon.path': '../dist/svg/icon-d.svg',
// 'menu.normalIcon.name': 'icon-d',
// 'menu.activeIcon.path': '../dist/svg/icon-b.svg',
// 'menu.activeIcon.name': 'icon-b',
// 'menu.disabledIcon.path': '../dist/svg/icon-a.svg',
// 'menu.disabledIcon.name': 'icon-a',
// 'menu.hoverIcon.path': '../dist/svg/icon-c.svg',
// 'menu.hoverIcon.name': 'icon-c',
// 'submenu.normalIcon.path': '../dist/svg/icon-a.svg',
// 'submenu.normalIcon.name': 'icon-a',
// 'submenu.activeIcon.path': '../dist/svg/icon-c.svg',
// 'submenu.activeIcon.name': 'icon-c',

'menu.iconSize.width': '24px',
'menu.iconSize.height': '24px',
'submenu.iconSize.width': '32px',
Expand Down