-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update fabric.js to v3.3.2 & modify webpack externals configurat…
…ion (fix #129, #134, #219) (#234) * fix: Resolve jQuery vulnerability * fix: Change fabric import method named to default & correct webpack external config (fix #129, #219) * fix: Add fabric.js to external library into karma webpack config (fix #134) * fix: Add half stroke width to center added icon's left, top
- Loading branch information
1 parent
b366b5c
commit a50444c
Showing
33 changed files
with
48 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Free drawing module, Set brush | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import Component from '../interface/component'; | ||
import consts from '../consts'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Add icon module | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import snippet from 'tui-code-snippet'; | ||
import Promise from 'core-js/library/es6/promise'; | ||
import Component from '../interface/component'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Free drawing module, Set brush | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import Component from '../interface/component'; | ||
import consts from '../consts'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Image rotation module | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import Promise from 'core-js/library/es6/promise'; | ||
import Component from '../interface/component'; | ||
import consts from '../consts'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Shape component | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import Promise from 'core-js/library/es6/promise'; | ||
import Component from '../interface/component'; | ||
import consts from '../consts'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Text module | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import snippet from 'tui-code-snippet'; | ||
import Promise from 'core-js/library/es6/promise'; | ||
import Component from '../interface/component'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Blur extending fabric.Image.filters.Convolute | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
|
||
/** | ||
* Blur object | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview ColorFilter extending fabric.Image.filters.BaseFilter | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
|
||
/** | ||
* ColorFilter object | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Emboss extending fabric.Image.filters.Convolute | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
|
||
/** | ||
* Emboss object | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Mask extending fabric.Image.filters.Mask | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
|
||
/** | ||
* Mask object | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Sharpen extending fabric.Image.filters.Convolute | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
|
||
/** | ||
* Sharpen object | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Test cases of "src/js/extension/cropzone.js" | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import Cropzone from '../src/js/extension/cropzone'; | ||
|
||
describe('Cropzone', () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Test cases of "src/js/component/flip.js" | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import $ from 'jquery'; | ||
import Graphics from '../src/js/graphics'; | ||
import Flip from '../src/js/component/flip'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Test cases of "src/js/component/icon.js" | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import $ from 'jquery'; | ||
import Graphics from '../src/js/graphics'; | ||
import Icon from '../src/js/component/icon'; | ||
|
@@ -41,9 +41,10 @@ describe('Icon', () => { | |
icon.add('arrow'); | ||
|
||
const activeObj = canvas.getActiveObject(); | ||
const halfStrokeWidth = activeObj.strokeWidth / 2; | ||
|
||
expect(activeObj.left).toEqual(centerPos.x); | ||
expect(activeObj.top).toEqual(centerPos.y); | ||
expect(activeObj.left + halfStrokeWidth).toEqual(centerPos.x); | ||
expect(activeObj.top + halfStrokeWidth).toEqual(centerPos.y); | ||
}); | ||
|
||
it('add() should create the arrow icon when parameter value is "arrow".', () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author NHN Ent. FE Development Lab <[email protected]> | ||
*/ | ||
import '../src'; | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
|
||
fabric.Object.prototype.objectCaching = false; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Test cases of "src/js/component/line.js" | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import $ from 'jquery'; | ||
import Graphics from '../src/js/graphics'; | ||
import Line from '../src/js/component/line'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Test cases of "src/js/component/rotation.js" | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import $ from 'jquery'; | ||
import Graphics from '../src/js/graphics'; | ||
import Rotation from '../src/js/component/rotation'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Test cases of "src/js/component/line.js" | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import $ from 'jquery'; | ||
import Graphics from '../src/js/graphics'; | ||
import Shape from '../src/js/component/shape'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @author NHN Ent. FE Development Team <[email protected]> | ||
* @fileoverview Test cases of "src/js/component/text.js" | ||
*/ | ||
import {fabric} from 'fabric'; | ||
import fabric from 'fabric'; | ||
import $ from 'jquery'; | ||
import Graphics from '../src/js/graphics'; | ||
import Text from '../src/js/component/text'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters