tui-image-editor
Advanced tools
Comparing version 3.0.2 to 3.1.0
@@ -32,3 +32,3 @@ { | ||
"fabric": "~1.6.4", | ||
"tui-code-snippet": "^1.2.5" | ||
"tui-code-snippet": "^1.3.0" | ||
}, | ||
@@ -38,3 +38,6 @@ "devDependencies": { | ||
"filesaver": "*" | ||
}, | ||
"resolutions": { | ||
"tui-code-snippet": "^1.3.0" | ||
} | ||
} |
{ | ||
"example01-basic": { | ||
"title": "Basic Example" | ||
"title": "1. Basic" | ||
}, | ||
"example02-mobile": { | ||
"title": "Mobile Example" | ||
"title": "2. Mobile" | ||
} | ||
} |
@@ -58,4 +58,4 @@ /* eslint-disable consts-on-top, no-process-env, require-jsdoc */ | ||
'Chrome-WebDriver', | ||
'Firefox-WebDriver', | ||
'Safari-WebDriver' | ||
'Firefox-WebDriver' | ||
// 'Safari-WebDriver' | ||
]; | ||
@@ -83,3 +83,3 @@ defaultConfig.reporters.push('coverage'); | ||
defaultConfig.junitReporter = { | ||
outputDir: 'report', | ||
outputDir: 'report/junit', | ||
suite: '' | ||
@@ -86,0 +86,0 @@ }; |
{ | ||
"name": "tui-image-editor", | ||
"author": "NHNEnt FE Development Lab <dl_javascript@nhnent.com>", | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"license": "MIT", | ||
@@ -60,4 +60,4 @@ "repository": "https://github.com/nhnent/tui.image-editor", | ||
"core-js": "2.4.1", | ||
"tui-code-snippet": "^1.2.5" | ||
"tui-code-snippet": "^1.3.0" | ||
} | ||
} |
@@ -21,13 +21,13 @@ # Image Editor | ||
## Documentation | ||
* API: [http://nhnent.github.io/tui.image-editor/latest/](http://nhnent.github.io/tui.image-editor/latest/) | ||
* Tutorial: [https://github.com/nhnent/tui.image-editor/wiki/Tutorial](https://github.com/nhnent/tui.image-editor/wiki/Tutorial) | ||
* Examples: [http://nhnent.github.io/tui.image-editor/latest/tutorial-example01-basic.html](http://nhnent.github.io/tui.image-editor/latest/tutorial-example01-basic.html) | ||
* **API** : [http://nhnent.github.io/tui.image-editor/latest/](http://nhnent.github.io/tui.image-editor/latest/) | ||
* **Tutorial** : [https://github.com/nhnent/tui.image-editor/wiki/Tutorial](https://github.com/nhnent/tui.image-editor/wiki/Tutorial) | ||
* **Example** : [http://nhnent.github.io/tui.image-editor/latest/tutorial-example01-basic.html](http://nhnent.github.io/tui.image-editor/latest/tutorial-example01-basic.html) | ||
## Dependency | ||
* [fabric.js: ~1.6.7](https://github.com/kangax/fabric.js/releases/tag/v1.6.7) | ||
* [tui.code-snippet: 1.2.5](https://github.com/nhnent/tui.code-snippet/releases/tag/v1.2.5) | ||
* [fabric.js](https://github.com/kangax/fabric.js/releases/tag/v1.6.7) >=1.6.7 | ||
* [tui.code-snippet](https://github.com/nhnent/tui.code-snippet/releases/tag/v1.2.5) >=1.3.0 | ||
## Tested Browsers | ||
* Browser: | ||
* IE9 ~ IE11 | ||
## Test Environment | ||
### PC | ||
* IE9~11 | ||
* Edge | ||
@@ -37,3 +37,3 @@ * Chrome | ||
* Safari | ||
* Mobile test environment | ||
### Mobile | ||
* iOS 9.3.x | ||
@@ -97,2 +97,24 @@ * Android 4.4.x | ||
### Via Contents Delivery Network (CDN) | ||
TOAST UI products are available over the CDN powered by [TOAST Cloud](https://www.toast.com). | ||
You can use the CDN as below. | ||
```html | ||
<script src="https://uicdn.toast.com/tui-image-editor/latest/tui-image-editor.js"></script> | ||
``` | ||
If you want to use a specific version, use the tag name instead of `latest` in the url's path. | ||
The CDN directory has the following structure. | ||
``` | ||
tui-image-editor/ | ||
├─ latest/ | ||
│ ├─ tui-image-editor.js | ||
│ └─ tui-image-editor.min.js | ||
├─ v3.1.0/ | ||
│ ├─ ... | ||
``` | ||
### Download | ||
@@ -99,0 +121,0 @@ * [Download bundle files from `dist` folder](https://github.com/nhnent/tui.image-editor/tree/production/dist) |
@@ -10,2 +10,3 @@ /** | ||
import consts from './consts'; | ||
import {sendHostName} from './util'; | ||
@@ -24,6 +25,9 @@ const events = consts.eventNames; | ||
* @param {number} option.cssMaxHeight - Canvas css-max-height | ||
* @param {Boolean} [option.usageStatistics=true] - Let us know the hostname. If you don't want to send the hostname, please set to false. | ||
*/ | ||
class ImageEditor { | ||
constructor(wrapper, option) { | ||
option = option || {}; | ||
option = snippet.extend({ | ||
usageStatistics: true | ||
}, option); | ||
@@ -69,2 +73,6 @@ /** | ||
} | ||
if (option.usageStatistics) { | ||
sendHostName(); | ||
} | ||
} | ||
@@ -71,0 +79,0 @@ |
@@ -5,4 +5,5 @@ /** | ||
*/ | ||
import {forEach} from 'tui-code-snippet'; | ||
import {forEach, imagePing} from 'tui-code-snippet'; | ||
const {min, max} = Math; | ||
let hostnameSent = false; | ||
@@ -75,3 +76,23 @@ module.exports = { | ||
return props; | ||
}, | ||
/** | ||
* send hostname | ||
*/ | ||
sendHostName() { | ||
const {hostname} = location; | ||
if (hostnameSent) { | ||
return; | ||
} | ||
hostnameSent = true; | ||
imagePing('https://www.google-analytics.com/collect', { | ||
v: 1, | ||
t: 'event', | ||
tid: 'UA-115377265-9', | ||
cid: hostname, | ||
dp: hostname, | ||
dh: 'image-editor' | ||
}); | ||
} | ||
}; |
@@ -211,3 +211,3 @@ /** | ||
expect(textareaStyles['font-size']).toEqual(`${expected.fontSize / ratio}px`); | ||
expect(textareaStyles['font-family'].replace(/'|"/g, '')).toEqual(expected.fontFamily); | ||
expect(textareaStyles['font-family'].replace(/'|"|\\/g, '')).toEqual(expected.fontFamily); | ||
expect(textareaStyles['font-weight']).toEqual(expected.fontWeight); | ||
@@ -214,0 +214,0 @@ expect(textareaStyles['font-align']).toEqual(expected.fontAlign); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2192965
123
20022
Updatedtui-code-snippet@^1.3.0