-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
19 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/* | ||
* @Author: 秦少卫 | ||
* @Date: 2023-06-20 12:52:09 | ||
* @LastEditors: June [email protected] | ||
* @LastEditTime: 2024-05-23 17:56:15 | ||
* @LastEditors: 秦少卫 | ||
* @LastEditTime: 2024-06-07 11:24:12 | ||
* @Description: 内部插件 | ||
*/ | ||
import { v4 as uuid } from 'uuid'; | ||
|
@@ -43,6 +43,7 @@ class ServersPlugin { | |
'addImgByElement', | ||
'getImageExtension', | ||
'getSelectMode', | ||
'getExtensionKey', | ||
]; | ||
static events = [SelectMode.ONE, SelectMode.MULTI, SelectEvent.CANCEL]; | ||
// public hotkeys: string[] = ['left', 'right', 'down', 'up']; | ||
|
@@ -139,14 +140,21 @@ class ServersPlugin { | |
} | ||
|
||
getJson() { | ||
return this.canvas.toJSON([ | ||
const keys = this.getExtensionKey(); | ||
return this.canvas.toJSON(keys); | ||
} | ||
|
||
getExtensionKey() { | ||
return [ | ||
'id', | ||
'gradientAngle', | ||
'selectable', | ||
'hasControls', | ||
'linkData', | ||
'editable', | ||
]); | ||
'extensionType', | ||
'extension', | ||
]; | ||
} | ||
|
||
/** | ||
|
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