|
@@ -46,17 +46,16 @@ export const useAutoPaste = () => {
|
|
|
paste.push({
|
|
|
["text/plain"]: {
|
|
|
async handler(pos, val) {
|
|
|
- console.log(val);
|
|
|
if (isSvgString(val)) {
|
|
|
const url = await resourceHandler(val, "svg");
|
|
|
- const icon = await getIconStyle(url)
|
|
|
- if (icon.fill) {
|
|
|
- icon.fill = '#000000'
|
|
|
- }
|
|
|
- if (icon.stroke) {
|
|
|
- icon.stroke = '#000000'
|
|
|
- }
|
|
|
- drawAPI.addShape("icon", { url, ...icon }, pos, true);
|
|
|
+ // const icon = await getIconStyle(url)
|
|
|
+ // if (icon.fill) {
|
|
|
+ // icon.fill = '#000000'
|
|
|
+ // }
|
|
|
+ // if (icon.stroke) {
|
|
|
+ // icon.stroke = '#000000'
|
|
|
+ // }
|
|
|
+ drawAPI.addShape("icon", { url }, pos, true);
|
|
|
} else {
|
|
|
drawAPI.addShape("text", { content: val }, pos, true);
|
|
|
}
|