yunseok

한글 splited

import ComponentInterface from "./ComponentInterface"
import Color from "./Color"
import Hangul from "hangul-js"
class Text extends ComponentInterface {
constructor(fabricObj) {
super();
this.color = new Color(fabricObj.fill);
this.text = fabricObj.text;
this.text = {
plain:fabricObj.text,
splited:Hangul.disassemble(fabricObj.text)
};
this.position = {
top:fabricObj.top,
left:fabricObj.left
......
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"hangul-js": {
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/hangul-js/-/hangul-js-0.2.6.tgz",
"integrity": "sha512-48axU8LgjCD30FEs66Xc04/8knxMwCMQw0f67l67rlttW7VXT3qRJgQeHmhiuGwWXGvSbk6YM0fhQlcjE1JFQA=="
}
}
}