From 4b9a7f834fe700e5b1685dbcea67b7142be55e44 Mon Sep 17 00:00:00 2001 From: chenshenhai Date: Sat, 23 Dec 2023 11:36:16 +0800 Subject: [PATCH] docs: update pages --- docs/404.html | 2 +- ...=> en-US_guide_class-idraw.md.0dAp1WjJ.js} | 22 +++++++---------- ...-US_guide_class-idraw.md.0dAp1WjJ.lean.js} | 2 +- ...=> zh-CN_guide_class-idraw.md.JZiupRyF.js} | 22 +++++++---------- ...-CN_guide_class-idraw.md.JZiupRyF.lean.js} | 2 +- docs/en-US/api/add-element.html | 2 +- docs/en-US/api/delete-element.html | 2 +- docs/en-US/api/get-data.html | 2 +- docs/en-US/api/move-element.html | 2 +- docs/en-US/api/resize.html | 2 +- docs/en-US/api/select-element.html | 2 +- docs/en-US/api/set-data.html | 2 +- docs/en-US/api/update-element.html | 2 +- docs/en-US/element/circle.html | 2 +- docs/en-US/element/group.html | 2 +- docs/en-US/element/html.html | 2 +- docs/en-US/element/image.html | 2 +- docs/en-US/element/info.html | 2 +- docs/en-US/element/path.html | 2 +- docs/en-US/element/rect.html | 2 +- docs/en-US/element/svg.html | 2 +- docs/en-US/element/text.html | 2 +- docs/en-US/guide/class-idraw.html | 24 ++++++++----------- docs/en-US/guide/installation.html | 2 +- docs/en-US/guide/introduction.html | 2 +- docs/en-US/guide/quickstart.html | 2 +- docs/en-US/index.html | 2 +- docs/hashmap.json | 2 +- docs/index.html | 2 +- docs/zh-CN/api/add-element.html | 2 +- docs/zh-CN/api/delete-element.html | 2 +- docs/zh-CN/api/get-data.html | 2 +- docs/zh-CN/api/move-element.html | 2 +- docs/zh-CN/api/resize.html | 2 +- docs/zh-CN/api/select-element.html | 2 +- docs/zh-CN/api/set-data.html | 2 +- docs/zh-CN/api/update-element.html | 2 +- docs/zh-CN/element/circle.html | 2 +- docs/zh-CN/element/group.html | 2 +- docs/zh-CN/element/html.html | 2 +- docs/zh-CN/element/image.html | 2 +- docs/zh-CN/element/info.html | 2 +- docs/zh-CN/element/path.html | 2 +- docs/zh-CN/element/rect.html | 2 +- docs/zh-CN/element/svg.html | 2 +- docs/zh-CN/element/text.html | 2 +- docs/zh-CN/guide/class-idraw.html | 24 ++++++++----------- docs/zh-CN/guide/installation.html | 2 +- docs/zh-CN/guide/introduction.html | 2 +- docs/zh-CN/guide/quickstart.html | 2 +- docs/zh-CN/index.html | 2 +- 51 files changed, 85 insertions(+), 101 deletions(-) rename docs/assets/{en-US_guide_class-idraw.md.upLrmA5_.js => en-US_guide_class-idraw.md.0dAp1WjJ.js} (55%) rename docs/assets/{en-US_guide_class-idraw.md.upLrmA5_.lean.js => en-US_guide_class-idraw.md.0dAp1WjJ.lean.js} (63%) rename docs/assets/{zh-CN_guide_class-idraw.md.9MkyAJ66.js => zh-CN_guide_class-idraw.md.JZiupRyF.js} (54%) rename docs/assets/{zh-CN_guide_class-idraw.md.9MkyAJ66.lean.js => zh-CN_guide_class-idraw.md.JZiupRyF.lean.js} (72%) diff --git a/docs/404.html b/docs/404.html index 5ddc52e..1f1822e 100644 --- a/docs/404.html +++ b/docs/404.html @@ -15,7 +15,7 @@
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- + \ No newline at end of file diff --git a/docs/assets/en-US_guide_class-idraw.md.upLrmA5_.js b/docs/assets/en-US_guide_class-idraw.md.0dAp1WjJ.js similarity index 55% rename from docs/assets/en-US_guide_class-idraw.md.upLrmA5_.js rename to docs/assets/en-US_guide_class-idraw.md.0dAp1WjJ.js index 08a97a0..ace207e 100644 --- a/docs/assets/en-US_guide_class-idraw.md.upLrmA5_.js +++ b/docs/assets/en-US_guide_class-idraw.md.0dAp1WjJ.js @@ -1,23 +1,19 @@ -import{_ as s,o as i,c as a,R as t,k as e}from"./chunks/framework.IreutGsD.js";const F=JSON.parse('{"title":"Class iDraw","description":"","frontmatter":{},"headers":[],"relativePath":"en-US/guide/class-idraw.md","filePath":"en-US/guide/class-idraw.md"}'),n={name:"en-US/guide/class-idraw.md"},d=t(`

Class iDraw

Arguments

js
import { iDraw } from 'idraw';
+import{_ as s,o as i,c as t,R as a,k as e}from"./chunks/framework.IreutGsD.js";const F=JSON.parse('{"title":"Class iDraw","description":"","frontmatter":{},"headers":[],"relativePath":"en-US/guide/class-idraw.md","filePath":"en-US/guide/class-idraw.md"}'),d={name:"en-US/guide/class-idraw.md"},n=a(`

Class iDraw

Arguments

js
import { iDraw } from 'idraw';
 const dom = document.querySelector('#app');
 const options = {
   width: 600,
   height: 400,
   devicePixelRatio: 2
 };
-const config = {
-  scrollWrapper: {
-    use: true
-  }
-};
 
-const idraw = new iDraw(dom, options, config);
ArugmentDescriptionTypeDefaultRequiredOthers
domCanvas mounted DOMHTMLDivElement-true-
optionsImage rendering options[Object]-true-

Options

ts
type Options = {
+const idraw = new iDraw(dom, options);
ArugmentDescriptionTypeDefaultRequiredOthers
domCanvas mounted DOMHTMLDivElement-true-
optionsImage rendering options[Object]-true-

Options

ts
type Options = {
   width: number;
   height: number;
   devicePixelRatio: number;
-  disableScroll?: boolean;
-  disableSelect?: boolean;
-  disableScale?: boolean;
-  disableRuler?: boolean;
-  disableTextEdit?: boolean;
-};

Options Properties

PropertyDescriptionTypeDefaultRequiredOthers
widthDrawing board's widthnumber-true-
heightDrawing board's heightnumber-true-
devicePixelRatioDevice pixel scalenumber1false-
disableScrollDisable canvas scrollbooleanfalsefalse-
disableSelectDisable canvas select elementsbooleanfalsefalse-
disableScaleDisable scalebooleanfalsefalse-
disableRulerDisable rulerbooleanfalsefalse-
disableTextEditDisable editing textbooleanfalsefalse-

Options Preivew

More Demo >>

`,10),l=e("iframe",{class:"idraw-playground-preview",src:"https://idraw.js.org/playground/?demo=basic-options&header=false&sider=false&default-editor-split=50",width:"1000",height:"440",frameborder:"no",border:"0",style:{border:"1px solid #cecece",margin:"0px auto"}},null,-1),h=[d,l];function p(r,k,o,c,E,g){return i(),a("div",null,h)}const b=s(n,[["render",p]]);export{F as __pageData,b as default}; + enableScroll?: boolean; + enableSelect?: boolean; + enableScale?: boolean; + enableRuler?: boolean; + enableTextEdit?: boolean; + enableDrag?: boolean; +};

Options Properties

PropertyDescriptionTypeDefaultRequiredOthers
widthDrawing board's widthnumber-true-
heightDrawing board's heightnumber-true-
devicePixelRatioDevice pixel scalenumber1false-
enableScrollEnable canvas scrollbooleantruefalse-
enableSelectEnable canvas select elements, Mutually exclusive with enableDragbooleantruefalse-
enableScaleEnable scalebooleantruefalse-
enableRulerEnable rulerbooleantruefalse-
enableTextEditEnable editing textbooleantruefalse-
enableDragEnable drag feature, Mutually exclusive with enableSelectbooleanfalsefalse-

Options Preivew

More Demo >>

`,10),l=e("iframe",{class:"idraw-playground-preview",src:"https://idraw.js.org/playground/?demo=basic-options&header=false&sider=false&default-editor-split=50",width:"1000",height:"440",frameborder:"no",border:"0",style:{border:"1px solid #cecece",margin:"0px auto"}},null,-1),h=[n,l];function p(r,k,o,c,E,g){return i(),t("div",null,h)}const b=s(d,[["render",p]]);export{F as __pageData,b as default}; diff --git a/docs/assets/en-US_guide_class-idraw.md.upLrmA5_.lean.js b/docs/assets/en-US_guide_class-idraw.md.0dAp1WjJ.lean.js similarity index 63% rename from docs/assets/en-US_guide_class-idraw.md.upLrmA5_.lean.js rename to docs/assets/en-US_guide_class-idraw.md.0dAp1WjJ.lean.js index c8c128e..58c8427 100644 --- a/docs/assets/en-US_guide_class-idraw.md.upLrmA5_.lean.js +++ b/docs/assets/en-US_guide_class-idraw.md.0dAp1WjJ.lean.js @@ -1 +1 @@ -import{_ as s,o as i,c as a,R as t,k as e}from"./chunks/framework.IreutGsD.js";const F=JSON.parse('{"title":"Class iDraw","description":"","frontmatter":{},"headers":[],"relativePath":"en-US/guide/class-idraw.md","filePath":"en-US/guide/class-idraw.md"}'),n={name:"en-US/guide/class-idraw.md"},d=t("",10),l=e("iframe",{class:"idraw-playground-preview",src:"https://idraw.js.org/playground/?demo=basic-options&header=false&sider=false&default-editor-split=50",width:"1000",height:"440",frameborder:"no",border:"0",style:{border:"1px solid #cecece",margin:"0px auto"}},null,-1),h=[d,l];function p(r,k,o,c,E,g){return i(),a("div",null,h)}const b=s(n,[["render",p]]);export{F as __pageData,b as default}; +import{_ as s,o as i,c as t,R as a,k as e}from"./chunks/framework.IreutGsD.js";const F=JSON.parse('{"title":"Class iDraw","description":"","frontmatter":{},"headers":[],"relativePath":"en-US/guide/class-idraw.md","filePath":"en-US/guide/class-idraw.md"}'),d={name:"en-US/guide/class-idraw.md"},n=a("",10),l=e("iframe",{class:"idraw-playground-preview",src:"https://idraw.js.org/playground/?demo=basic-options&header=false&sider=false&default-editor-split=50",width:"1000",height:"440",frameborder:"no",border:"0",style:{border:"1px solid #cecece",margin:"0px auto"}},null,-1),h=[n,l];function p(r,k,o,c,E,g){return i(),t("div",null,h)}const b=s(d,[["render",p]]);export{F as __pageData,b as default}; diff --git a/docs/assets/zh-CN_guide_class-idraw.md.9MkyAJ66.js b/docs/assets/zh-CN_guide_class-idraw.md.JZiupRyF.js similarity index 54% rename from docs/assets/zh-CN_guide_class-idraw.md.9MkyAJ66.js rename to docs/assets/zh-CN_guide_class-idraw.md.JZiupRyF.js index e9cf13f..ed69678 100644 --- a/docs/assets/zh-CN_guide_class-idraw.md.9MkyAJ66.js +++ b/docs/assets/zh-CN_guide_class-idraw.md.JZiupRyF.js @@ -1,23 +1,19 @@ -import{_ as s,o as i,c as a,R as t,k as e}from"./chunks/framework.IreutGsD.js";const F=JSON.parse('{"title":"iDraw 类","description":"","frontmatter":{},"headers":[],"relativePath":"zh-CN/guide/class-idraw.md","filePath":"zh-CN/guide/class-idraw.md"}'),d={name:"zh-CN/guide/class-idraw.md"},n=t(`

iDraw 类

参数

js
import { iDraw } from 'idraw';
+import{_ as s,o as i,c as t,R as a,k as e}from"./chunks/framework.IreutGsD.js";const F=JSON.parse('{"title":"iDraw 类","description":"","frontmatter":{},"headers":[],"relativePath":"zh-CN/guide/class-idraw.md","filePath":"zh-CN/guide/class-idraw.md"}'),d={name:"zh-CN/guide/class-idraw.md"},n=a(`

iDraw 类

参数

js
import { iDraw } from 'idraw';
 const dom = document.querySelector('#app');
 const options = {
   width: 600,
   height: 400,
   devicePixelRatio: 2
 };
-const config = {
-  scrollWrapper: {
-    use: true
-  }
-};
 
-const idraw = new iDraw(dom, options, config);

在使用 new iDraw(dom, options) 类时,会接收三个参数。参数信息有下:

参数说明类型默认值是否必填备注
dom渲染DOM节点HTMLDivElement-true-
options渲染内容选项Object-true-

选项 Options

ts
type Options = {
+const idraw = new iDraw(dom, options);

在使用 new iDraw(dom, options) 类时,会接收三个参数。参数信息有下:

参数说明类型默认值是否必填备注
dom渲染DOM节点HTMLDivElement-true-
options渲染内容选项Object-true-

选项 Options

ts
type Options = {
   width: number;
   height: number;
   devicePixelRatio: number;
-  disableScroll?: boolean;
-  disableSelect?: boolean;
-  disableScale?: boolean;
-  disableRuler?: boolean;
-  disableTextEdit?: boolean;
-};

Options 属性

属性说明类型默认值是否必填备注
width画板宽度number-true-
height画板高度number-true-
devicePixelRatio设备像素比例number1false-
disableScroll禁用滚动booleanfalsefalse-
disableSelect禁用选择booleanfalsefalse-
disableScale禁用缩放booleanfalsefalse-
disableRuler禁用标尺booleanfalsefalse-
disableTextEdit禁用文本编辑booleanfalsefalse-

Options 效果预览

Demo完整预览 Playground >>

`,11),h=e("iframe",{class:"idraw-playground-preview",src:"https://idraw.js.org/playground/?demo=basic-options&header=false&sider=false&default-editor-split=50",width:"1000",height:"440",frameborder:"no",border:"0",style:{border:"1px solid #cecece",margin:"0px auto"}},null,-1),l=[n,h];function p(k,r,o,c,E,g){return i(),a("div",null,l)}const b=s(d,[["render",p]]);export{F as __pageData,b as default}; + enableScroll?: boolean; + enableSelect?: boolean; + enableScale?: boolean; + enableRuler?: boolean; + enableTextEdit?: boolean; + enableDrag?: boolean; +};

Options 属性

属性说明类型默认值是否必填备注
width画板宽度number-true-
height画板高度number-true-
devicePixelRatio设备像素比例number1false-
enableScroll启用视图滚动booleantruefalse-
enableSelect启用元素选择(和enableDrag互斥)booleantruefalse-
enableScale启用视图缩放booleantruefalse-
enableRuler启用视图标尺booleantruefalse-
enableTextEdit启用文本编辑booleantruefalse-
enableDrag启用视图拖拽(和enableSelect互斥)booleanfalsefalse-

Options 效果预览

Demo完整预览 Playground >>

`,11),h=e("iframe",{class:"idraw-playground-preview",src:"https://idraw.js.org/playground/?demo=basic-options&header=false&sider=false&default-editor-split=50",width:"1000",height:"440",frameborder:"no",border:"0",style:{border:"1px solid #cecece",margin:"0px auto"}},null,-1),l=[n,h];function p(k,r,o,c,E,g){return i(),t("div",null,l)}const b=s(d,[["render",p]]);export{F as __pageData,b as default}; diff --git a/docs/assets/zh-CN_guide_class-idraw.md.9MkyAJ66.lean.js b/docs/assets/zh-CN_guide_class-idraw.md.JZiupRyF.lean.js similarity index 72% rename from docs/assets/zh-CN_guide_class-idraw.md.9MkyAJ66.lean.js rename to docs/assets/zh-CN_guide_class-idraw.md.JZiupRyF.lean.js index 6b7068f..e4e0625 100644 --- a/docs/assets/zh-CN_guide_class-idraw.md.9MkyAJ66.lean.js +++ b/docs/assets/zh-CN_guide_class-idraw.md.JZiupRyF.lean.js @@ -1 +1 @@ -import{_ as s,o as i,c as a,R as t,k as e}from"./chunks/framework.IreutGsD.js";const F=JSON.parse('{"title":"iDraw 类","description":"","frontmatter":{},"headers":[],"relativePath":"zh-CN/guide/class-idraw.md","filePath":"zh-CN/guide/class-idraw.md"}'),d={name:"zh-CN/guide/class-idraw.md"},n=t("",11),h=e("iframe",{class:"idraw-playground-preview",src:"https://idraw.js.org/playground/?demo=basic-options&header=false&sider=false&default-editor-split=50",width:"1000",height:"440",frameborder:"no",border:"0",style:{border:"1px solid #cecece",margin:"0px auto"}},null,-1),l=[n,h];function p(k,r,o,c,E,g){return i(),a("div",null,l)}const b=s(d,[["render",p]]);export{F as __pageData,b as default}; +import{_ as s,o as i,c as t,R as a,k as e}from"./chunks/framework.IreutGsD.js";const F=JSON.parse('{"title":"iDraw 类","description":"","frontmatter":{},"headers":[],"relativePath":"zh-CN/guide/class-idraw.md","filePath":"zh-CN/guide/class-idraw.md"}'),d={name:"zh-CN/guide/class-idraw.md"},n=a("",11),h=e("iframe",{class:"idraw-playground-preview",src:"https://idraw.js.org/playground/?demo=basic-options&header=false&sider=false&default-editor-split=50",width:"1000",height:"440",frameborder:"no",border:"0",style:{border:"1px solid #cecece",margin:"0px auto"}},null,-1),l=[n,h];function p(k,r,o,c,E,g){return i(),t("div",null,l)}const b=s(d,[["render",p]]);export{F as __pageData,b as default}; diff --git a/docs/en-US/api/add-element.html b/docs/en-US/api/add-element.html index 6556fb9..d1bdbab 100644 --- a/docs/en-US/api/add-element.html +++ b/docs/en-US/api/add-element.html @@ -42,7 +42,7 @@ borderColor: '#ff6032' } });

Example

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/api/delete-element.html b/docs/en-US/api/delete-element.html index c4720ae..61bdb9d 100644 --- a/docs/en-US/api/delete-element.html +++ b/docs/en-US/api/delete-element.html @@ -36,7 +36,7 @@ const uuid = idraw.getData().elements[0].uuid; idraw.deleteElement(uuid);

示例

Example

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/api/get-data.html b/docs/en-US/api/get-data.html index 9548cd6..c2a38c7 100644 --- a/docs/en-US/api/get-data.html +++ b/docs/en-US/api/get-data.html @@ -50,7 +50,7 @@ const resultData = idraw.getData(); console.log(resultData);

Example

More Demo

- + \ No newline at end of file diff --git a/docs/en-US/api/move-element.html b/docs/en-US/api/move-element.html index 252353d..1417d09 100644 --- a/docs/en-US/api/move-element.html +++ b/docs/en-US/api/move-element.html @@ -36,7 +36,7 @@ const uuid = idraw.getData().elements[0].uuid; idraw.moveElement(uuid, { position: [1, 2] });

Example

More Demo

- + \ No newline at end of file diff --git a/docs/en-US/api/resize.html b/docs/en-US/api/resize.html index 8c45c8d..f2d4b4b 100644 --- a/docs/en-US/api/resize.html +++ b/docs/en-US/api/resize.html @@ -39,7 +39,7 @@ height: 200, devicePixelRatio: 2 });

Example

More Demo

- + \ No newline at end of file diff --git a/docs/en-US/api/select-element.html b/docs/en-US/api/select-element.html index b8c2588..b76ba48 100644 --- a/docs/en-US/api/select-element.html +++ b/docs/en-US/api/select-element.html @@ -35,7 +35,7 @@ const resultData = idraw.getData(); idraw.selectElement(resultData.elements[0].uuid);

Example

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/api/set-data.html b/docs/en-US/api/set-data.html index 097a05f..f5a541f 100644 --- a/docs/en-US/api/set-data.html +++ b/docs/en-US/api/set-data.html @@ -46,7 +46,7 @@ ] }; idraw.setData(data);

Example

More Demo

- + \ No newline at end of file diff --git a/docs/en-US/api/update-element.html b/docs/en-US/api/update-element.html index 1794a8b..0b1438e 100644 --- a/docs/en-US/api/update-element.html +++ b/docs/en-US/api/update-element.html @@ -39,7 +39,7 @@ elem.detail.color = '#f0f0f0'; idraw.updateData(elem);

Example

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/element/circle.html b/docs/en-US/element/circle.html index e43f74f..b3ba0b9 100644 --- a/docs/en-US/element/circle.html +++ b/docs/en-US/element/circle.html @@ -50,7 +50,7 @@ borderColor: '#3f51b5' } };

Demo Preview

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/element/group.html b/docs/en-US/element/group.html index e3c921c..845a67c 100644 --- a/docs/en-US/element/group.html +++ b/docs/en-US/element/group.html @@ -49,7 +49,7 @@ children: [] } };

Demo Preview

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/element/html.html b/docs/en-US/element/html.html index c97a0f9..e035f24 100644 --- a/docs/en-US/element/html.html +++ b/docs/en-US/element/html.html @@ -86,7 +86,7 @@ ` } };

Demo Preview

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/element/image.html b/docs/en-US/element/image.html index bf24e73..01bebb3 100644 --- a/docs/en-US/element/image.html +++ b/docs/en-US/element/image.html @@ -41,7 +41,7 @@ src: './image/github.png' } };

Demo Preview

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/element/info.html b/docs/en-US/element/info.html index 67964cf..b51fb5a 100644 --- a/docs/en-US/element/info.html +++ b/docs/en-US/element/info.html @@ -68,7 +68,7 @@ // Set drawing-data for rendering view idraw.setData(data);

Demo Preview

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/element/path.html b/docs/en-US/element/path.html index 47a5ced..191f369 100644 --- a/docs/en-US/element/path.html +++ b/docs/en-US/element/path.html @@ -77,7 +77,7 @@ originW: 80 } };

Demo Preview

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/element/rect.html b/docs/en-US/element/rect.html index dbb8e89..395d517 100644 --- a/docs/en-US/element/rect.html +++ b/docs/en-US/element/rect.html @@ -50,7 +50,7 @@ borderColor: '#3f51b5' } };

Demo Preview

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/element/svg.html b/docs/en-US/element/svg.html index 9734072..05a0579 100644 --- a/docs/en-US/element/svg.html +++ b/docs/en-US/element/svg.html @@ -41,7 +41,7 @@ svg: `<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="400" height="400"><path d="M512 1013.76c-277.11488 0-501.76-224.64512-501.76-501.76S234.88512 10.24 512 10.24s501.76 224.64512 501.76 501.76-224.64512 501.76-501.76 501.76z m0-51.02592c248.9344 0 450.73408-201.79968 450.73408-450.73408 0-248.9344-201.79968-450.73408-450.73408-450.73408-248.9344 0-450.73408 201.79968-450.73408 450.73408 0 248.9344 201.79968 450.73408 450.73408 450.73408zM456.9856 637.9008l295.45984-339.94752a26.4192 26.4192 0 0 1 37.59616-2.31936 28.32896 28.32896 0 0 1 3.10784 38.8608l-307.01568 380.38016a30.72 30.72 0 0 1-42.90048 4.84864L235.44832 556.2368a32.128 32.128 0 0 1-5.74976-44.6464 32.1536 32.1536 0 0 1 44.544-6.58944l182.74304 132.90496z" fill="#1890ff"></path></svg>` } };

Demo Preview

More Demo >>

- + \ No newline at end of file diff --git a/docs/en-US/element/text.html b/docs/en-US/element/text.html index 4eb1f17..4a71d42 100644 --- a/docs/en-US/element/text.html +++ b/docs/en-US/element/text.html @@ -58,7 +58,7 @@ borderColor: '#3f51b5' } };

Demo Preview

More Demo

- + \ No newline at end of file diff --git a/docs/en-US/guide/class-idraw.html b/docs/en-US/guide/class-idraw.html index 049e392..c9f7e32 100644 --- a/docs/en-US/guide/class-idraw.html +++ b/docs/en-US/guide/class-idraw.html @@ -12,7 +12,7 @@ - + @@ -24,23 +24,19 @@ height: 400, devicePixelRatio: 2 }; -const config = { - scrollWrapper: { - use: true - } -}; -const idraw = new iDraw(dom, options, config);
ArugmentDescriptionTypeDefaultRequiredOthers
domCanvas mounted DOMHTMLDivElement-true-
optionsImage rendering options[Object]-true-

Options

ts
type Options = {
+const idraw = new iDraw(dom, options);
ArugmentDescriptionTypeDefaultRequiredOthers
domCanvas mounted DOMHTMLDivElement-true-
optionsImage rendering options[Object]-true-

Options

ts
type Options = {
   width: number;
   height: number;
   devicePixelRatio: number;
-  disableScroll?: boolean;
-  disableSelect?: boolean;
-  disableScale?: boolean;
-  disableRuler?: boolean;
-  disableTextEdit?: boolean;
-};

Options Properties

PropertyDescriptionTypeDefaultRequiredOthers
widthDrawing board's widthnumber-true-
heightDrawing board's heightnumber-true-
devicePixelRatioDevice pixel scalenumber1false-
disableScrollDisable canvas scrollbooleanfalsefalse-
disableSelectDisable canvas select elementsbooleanfalsefalse-
disableScaleDisable scalebooleanfalsefalse-
disableRulerDisable rulerbooleanfalsefalse-
disableTextEditDisable editing textbooleanfalsefalse-

Options Preivew

More Demo >>

- + enableScroll?: boolean; + enableSelect?: boolean; + enableScale?: boolean; + enableRuler?: boolean; + enableTextEdit?: boolean; + enableDrag?: boolean; +};

Options Properties

PropertyDescriptionTypeDefaultRequiredOthers
widthDrawing board's widthnumber-true-
heightDrawing board's heightnumber-true-
devicePixelRatioDevice pixel scalenumber1false-
enableScrollEnable canvas scrollbooleantruefalse-
enableSelectEnable canvas select elements, Mutually exclusive with enableDragbooleantruefalse-
enableScaleEnable scalebooleantruefalse-
enableRulerEnable rulerbooleantruefalse-
enableTextEditEnable editing textbooleantruefalse-
enableDragEnable drag feature, Mutually exclusive with enableSelectbooleanfalsefalse-

Options Preivew

More Demo >>

+ \ No newline at end of file diff --git a/docs/en-US/guide/installation.html b/docs/en-US/guide/installation.html index ca07ce8..8606703 100644 --- a/docs/en-US/guide/installation.html +++ b/docs/en-US/guide/installation.html @@ -29,7 +29,7 @@ }); })(); </script>

Download and Self Host

If you want to avoid using build tools but can't use CDN in production then you can download the relevant .js file and host it using your own web server. You can include it using a <script> tag, just like with the CDN approach.

The files can be browsed and download from a CDN such as unpkg .

- + \ No newline at end of file diff --git a/docs/en-US/guide/introduction.html b/docs/en-US/guide/introduction.html index 259c13f..44d8aa4 100644 --- a/docs/en-US/guide/introduction.html +++ b/docs/en-US/guide/introduction.html @@ -47,7 +47,7 @@ devicePixelRatio: 2 }); idraw.setData(data); - + \ No newline at end of file diff --git a/docs/en-US/guide/quickstart.html b/docs/en-US/guide/quickstart.html index 001b05d..d43673b 100644 --- a/docs/en-US/guide/quickstart.html +++ b/docs/en-US/guide/quickstart.html @@ -47,7 +47,7 @@ // Setting data idraw.setData(data);

Now, we can start the tutorials for using iDraw.js. O(∩_∩)O~

- + \ No newline at end of file diff --git a/docs/en-US/index.html b/docs/en-US/index.html index c199c46..8f77f1a 100644 --- a/docs/en-US/index.html +++ b/docs/en-US/index.html @@ -18,7 +18,7 @@
Skip to content

iDraw.js

Drawing easier on the web.

A simple JavaScript framework for Drawing on the web.

- + \ No newline at end of file diff --git a/docs/hashmap.json b/docs/hashmap.json index 319f557..2ff5a39 100644 --- a/docs/hashmap.json +++ b/docs/hashmap.json @@ -1 +1 @@ -{"en-us_api_delete-element.md":"UOf4Iuyy","en-us_api_get-data.md":"5itVpWw_","en-us_api_add-element.md":"bUAmBGm_","en-us_api_move-element.md":"0UdGR1Oo","en-us_api_resize.md":"I6ULM8GJ","en-us_api_select-element.md":"qO52wq09","en-us_api_set-data.md":"DthFbnx7","en-us_api_update-element.md":"efCl2dWA","en-us_element_group.md":"lHvld_Yw","en-us_element_circle.md":"onKXJYe5","en-us_element_image.md":"dHo2Rlih","en-us_element_html.md":"nB_TupJx","en-us_element_info.md":"oMIOKgeZ","en-us_element_svg.md":"MgPR9jyQ","en-us_guide_class-idraw.md":"upLrmA5_","en-us_element_text.md":"-5DD-K9e","en-us_guide_installation.md":"g-z2crol","en-us_element_rect.md":"weCw68zG","en-us_element_path.md":"FBUQZwIG","index.md":"f--IV0hU","en-us_index.md":"Imzo5M5L","en-us_guide_quickstart.md":"bMSmAlbF","en-us_guide_introduction.md":"hd0do4ra","zh-cn_api_delete-element.md":"a5OfA3y8","zh-cn_api_add-element.md":"D_wu8lhK","zh-cn_api_move-element.md":"6CvkMsMR","zh-cn_api_get-data.md":"U0cu5oRa","zh-cn_api_resize.md":"R_mBA62X","zh-cn_api_select-element.md":"oqaPEOsE","zh-cn_api_set-data.md":"ojd3fGTI","zh-cn_api_update-element.md":"erEGAE7r","zh-cn_element_circle.md":"zKxf-_a2","zh-cn_element_group.md":"2Q1fLBho","zh-cn_element_html.md":"HZf0i9Sz","zh-cn_element_image.md":"FyqC5h9l","zh-cn_element_info.md":"Ijo9u3qj","zh-cn_element_path.md":"rEjv6vfA","zh-cn_element_rect.md":"cHI4OmCG","zh-cn_element_svg.md":"HQCGUJ4j","zh-cn_element_text.md":"v2QqFUs9","zh-cn_guide_installation.md":"CQ393Z_g","zh-cn_guide_class-idraw.md":"9MkyAJ66","zh-cn_guide_introduction.md":"teNMSTUN","zh-cn_index.md":"yZZ488aY","zh-cn_guide_quickstart.md":"6FJVCidN"} +{"en-us_api_add-element.md":"bUAmBGm_","en-us_api_get-data.md":"5itVpWw_","en-us_api_resize.md":"I6ULM8GJ","en-us_api_delete-element.md":"UOf4Iuyy","en-us_api_move-element.md":"0UdGR1Oo","en-us_api_select-element.md":"qO52wq09","en-us_api_set-data.md":"DthFbnx7","en-us_api_update-element.md":"efCl2dWA","en-us_element_circle.md":"onKXJYe5","en-us_element_image.md":"dHo2Rlih","en-us_element_html.md":"nB_TupJx","en-us_element_group.md":"lHvld_Yw","en-us_element_path.md":"FBUQZwIG","en-us_element_info.md":"oMIOKgeZ","en-us_element_text.md":"-5DD-K9e","zh-cn_api_resize.md":"R_mBA62X","en-us_element_svg.md":"MgPR9jyQ","en-us_element_rect.md":"weCw68zG","zh-cn_api_get-data.md":"U0cu5oRa","zh-cn_api_move-element.md":"6CvkMsMR","zh-cn_api_delete-element.md":"a5OfA3y8","index.md":"f--IV0hU","en-us_guide_introduction.md":"hd0do4ra","zh-cn_guide_class-idraw.md":"JZiupRyF","en-us_index.md":"Imzo5M5L","zh-cn_index.md":"yZZ488aY","zh-cn_guide_quickstart.md":"6FJVCidN","en-us_guide_installation.md":"g-z2crol","zh-cn_guide_introduction.md":"teNMSTUN","zh-cn_element_text.md":"v2QqFUs9","zh-cn_api_add-element.md":"D_wu8lhK","en-us_guide_quickstart.md":"bMSmAlbF","zh-cn_api_select-element.md":"oqaPEOsE","en-us_guide_class-idraw.md":"0dAp1WjJ","zh-cn_api_set-data.md":"ojd3fGTI","zh-cn_element_group.md":"2Q1fLBho","zh-cn_api_update-element.md":"erEGAE7r","zh-cn_element_path.md":"rEjv6vfA","zh-cn_element_image.md":"FyqC5h9l","zh-cn_element_html.md":"HZf0i9Sz","zh-cn_element_circle.md":"zKxf-_a2","zh-cn_element_rect.md":"cHI4OmCG","zh-cn_element_info.md":"Ijo9u3qj","zh-cn_element_svg.md":"HQCGUJ4j","zh-cn_guide_installation.md":"CQ393Z_g"} diff --git a/docs/index.html b/docs/index.html index bf7a01a..3f65400 100644 --- a/docs/index.html +++ b/docs/index.html @@ -18,7 +18,7 @@
Skip to content

iDraw.js

Drawing easier on the web.

A simple JavaScript framework for Drawing on the web.

- + \ No newline at end of file diff --git a/docs/zh-CN/api/add-element.html b/docs/zh-CN/api/add-element.html index e3e3a07..11d10f1 100644 --- a/docs/zh-CN/api/add-element.html +++ b/docs/zh-CN/api/add-element.html @@ -42,7 +42,7 @@ borderColor: '#ff6032' } });

示例

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/api/delete-element.html b/docs/zh-CN/api/delete-element.html index dc670fa..7068441 100644 --- a/docs/zh-CN/api/delete-element.html +++ b/docs/zh-CN/api/delete-element.html @@ -36,7 +36,7 @@ const uuid = idraw.getData().elements[0].uuid; idraw.deleteElement(uuid);

示例

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/api/get-data.html b/docs/zh-CN/api/get-data.html index e9902dd..bf8f1bc 100644 --- a/docs/zh-CN/api/get-data.html +++ b/docs/zh-CN/api/get-data.html @@ -50,7 +50,7 @@ const resultData = idraw.getData(); console.log(resultData);

示例

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/api/move-element.html b/docs/zh-CN/api/move-element.html index ebd2c20..eefcec9 100644 --- a/docs/zh-CN/api/move-element.html +++ b/docs/zh-CN/api/move-element.html @@ -36,7 +36,7 @@ const uuid = idraw.getData().elements[0].uuid; idraw.moveElement(uuid, { position: [1, 2] });

示例

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/api/resize.html b/docs/zh-CN/api/resize.html index ab04ee6..320d4e0 100644 --- a/docs/zh-CN/api/resize.html +++ b/docs/zh-CN/api/resize.html @@ -39,7 +39,7 @@ height: 200, devicePixelRatio: 2 });

示例

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/api/select-element.html b/docs/zh-CN/api/select-element.html index 172157b..781006d 100644 --- a/docs/zh-CN/api/select-element.html +++ b/docs/zh-CN/api/select-element.html @@ -35,7 +35,7 @@ const resultData = idraw.getData(); idraw.selectElement(resultData.elements[0].uuid);

示例

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/api/set-data.html b/docs/zh-CN/api/set-data.html index a33f7c3..f7a30a0 100644 --- a/docs/zh-CN/api/set-data.html +++ b/docs/zh-CN/api/set-data.html @@ -46,7 +46,7 @@ ] }; idraw.setData(data);

示例

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/api/update-element.html b/docs/zh-CN/api/update-element.html index 114ae99..5801e19 100644 --- a/docs/zh-CN/api/update-element.html +++ b/docs/zh-CN/api/update-element.html @@ -39,7 +39,7 @@ elem.detail.color = '#f0f0f0'; idraw.updateData(elem);

示例

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/element/circle.html b/docs/zh-CN/element/circle.html index 941be66..bd3e3cf 100644 --- a/docs/zh-CN/element/circle.html +++ b/docs/zh-CN/element/circle.html @@ -50,7 +50,7 @@ borderColor: '#3f51b5' } };

效果预览

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/element/group.html b/docs/zh-CN/element/group.html index d015f6d..3111565 100644 --- a/docs/zh-CN/element/group.html +++ b/docs/zh-CN/element/group.html @@ -49,7 +49,7 @@ children: [] } };

效果预览

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/element/html.html b/docs/zh-CN/element/html.html index 78bcff4..096a835 100644 --- a/docs/zh-CN/element/html.html +++ b/docs/zh-CN/element/html.html @@ -86,7 +86,7 @@ ` } };

效果预览

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/element/image.html b/docs/zh-CN/element/image.html index 1f66f6e..90b11fe 100644 --- a/docs/zh-CN/element/image.html +++ b/docs/zh-CN/element/image.html @@ -41,7 +41,7 @@ src: './image/github.png' } };

效果预览

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/element/info.html b/docs/zh-CN/element/info.html index 7be97b7..5c9bd93 100644 --- a/docs/zh-CN/element/info.html +++ b/docs/zh-CN/element/info.html @@ -69,7 +69,7 @@ // 设置元素数据,渲染画图内容 idraw.setData(data);

示例预览

Demo 完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/element/path.html b/docs/zh-CN/element/path.html index 99abc89..9a99bf9 100644 --- a/docs/zh-CN/element/path.html +++ b/docs/zh-CN/element/path.html @@ -77,7 +77,7 @@ originW: 80 } };

效果预览

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/element/rect.html b/docs/zh-CN/element/rect.html index f961fcb..7953f75 100644 --- a/docs/zh-CN/element/rect.html +++ b/docs/zh-CN/element/rect.html @@ -50,7 +50,7 @@ borderColor: '#3f51b5' } };

效果预览

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/element/svg.html b/docs/zh-CN/element/svg.html index af4f649..f252782 100644 --- a/docs/zh-CN/element/svg.html +++ b/docs/zh-CN/element/svg.html @@ -41,7 +41,7 @@ svg: `<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="400" height="400"><path d="M512 1013.76c-277.11488 0-501.76-224.64512-501.76-501.76S234.88512 10.24 512 10.24s501.76 224.64512 501.76 501.76-224.64512 501.76-501.76 501.76z m0-51.02592c248.9344 0 450.73408-201.79968 450.73408-450.73408 0-248.9344-201.79968-450.73408-450.73408-450.73408-248.9344 0-450.73408 201.79968-450.73408 450.73408 0 248.9344 201.79968 450.73408 450.73408 450.73408zM456.9856 637.9008l295.45984-339.94752a26.4192 26.4192 0 0 1 37.59616-2.31936 28.32896 28.32896 0 0 1 3.10784 38.8608l-307.01568 380.38016a30.72 30.72 0 0 1-42.90048 4.84864L235.44832 556.2368a32.128 32.128 0 0 1-5.74976-44.6464 32.1536 32.1536 0 0 1 44.544-6.58944l182.74304 132.90496z" fill="#1890ff"></path></svg>` } };

效果预览

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/element/text.html b/docs/zh-CN/element/text.html index 982cebe..d3808b0 100644 --- a/docs/zh-CN/element/text.html +++ b/docs/zh-CN/element/text.html @@ -59,7 +59,7 @@ borderColor: '#3f51b5' } };

效果预览

Demo完整预览 Playground >>

- + \ No newline at end of file diff --git a/docs/zh-CN/guide/class-idraw.html b/docs/zh-CN/guide/class-idraw.html index f15b9e6..2206f7c 100644 --- a/docs/zh-CN/guide/class-idraw.html +++ b/docs/zh-CN/guide/class-idraw.html @@ -12,7 +12,7 @@ - + @@ -24,23 +24,19 @@ height: 400, devicePixelRatio: 2 }; -const config = { - scrollWrapper: { - use: true - } -}; -const idraw = new iDraw(dom, options, config);

在使用 new iDraw(dom, options) 类时,会接收三个参数。参数信息有下:

参数说明类型默认值是否必填备注
dom渲染DOM节点HTMLDivElement-true-
options渲染内容选项Object-true-

选项 Options

ts
type Options = {
+const idraw = new iDraw(dom, options);

在使用 new iDraw(dom, options) 类时,会接收三个参数。参数信息有下:

参数说明类型默认值是否必填备注
dom渲染DOM节点HTMLDivElement-true-
options渲染内容选项Object-true-

选项 Options

ts
type Options = {
   width: number;
   height: number;
   devicePixelRatio: number;
-  disableScroll?: boolean;
-  disableSelect?: boolean;
-  disableScale?: boolean;
-  disableRuler?: boolean;
-  disableTextEdit?: boolean;
-};

Options 属性

属性说明类型默认值是否必填备注
width画板宽度number-true-
height画板高度number-true-
devicePixelRatio设备像素比例number1false-
disableScroll禁用滚动booleanfalsefalse-
disableSelect禁用选择booleanfalsefalse-
disableScale禁用缩放booleanfalsefalse-
disableRuler禁用标尺booleanfalsefalse-
disableTextEdit禁用文本编辑booleanfalsefalse-

Options 效果预览

Demo完整预览 Playground >>

- + enableScroll?: boolean; + enableSelect?: boolean; + enableScale?: boolean; + enableRuler?: boolean; + enableTextEdit?: boolean; + enableDrag?: boolean; +};

Options 属性

属性说明类型默认值是否必填备注
width画板宽度number-true-
height画板高度number-true-
devicePixelRatio设备像素比例number1false-
enableScroll启用视图滚动booleantruefalse-
enableSelect启用元素选择(和enableDrag互斥)booleantruefalse-
enableScale启用视图缩放booleantruefalse-
enableRuler启用视图标尺booleantruefalse-
enableTextEdit启用文本编辑booleantruefalse-
enableDrag启用视图拖拽(和enableSelect互斥)booleanfalsefalse-

Options 效果预览

Demo完整预览 Playground >>

+ \ No newline at end of file diff --git a/docs/zh-CN/guide/installation.html b/docs/zh-CN/guide/installation.html index ea023a1..ea59ea7 100644 --- a/docs/zh-CN/guide/installation.html +++ b/docs/zh-CN/guide/installation.html @@ -29,7 +29,7 @@ }); })() </script>

WARNING

不建议用 unpkg.com 站点的CDN资源的放在生产环境

自托管JavaScript文件

如果不想使用构建工具,同时无法直接使用 CDN方式 调用,那么可以将相关的 .js 文件下载到项目本地或者服务器上托管。最后通过 <script> 方式引用,使用方法跟 CDN 的方式类似。

具体的 JavaScript文件 可以从 unpkg 这里下载最新的 iDraw.js 文件。

- + \ No newline at end of file diff --git a/docs/zh-CN/guide/introduction.html b/docs/zh-CN/guide/introduction.html index 6b0c1ab..5900fdc 100644 --- a/docs/zh-CN/guide/introduction.html +++ b/docs/zh-CN/guide/introduction.html @@ -47,7 +47,7 @@ devicePixelRatio: 2 }); idraw.setData(data); - + \ No newline at end of file diff --git a/docs/zh-CN/guide/quickstart.html b/docs/zh-CN/guide/quickstart.html index 9ec9a12..ca1549e 100644 --- a/docs/zh-CN/guide/quickstart.html +++ b/docs/zh-CN/guide/quickstart.html @@ -47,7 +47,7 @@ // 设置数据 idraw.setData(data);

至此,小伙伴们就可以愉快的开启 iDraw.js 的画图之旅啦!O(∩_∩)O~

- + \ No newline at end of file diff --git a/docs/zh-CN/index.html b/docs/zh-CN/index.html index 875e899..d6c4bfd 100644 --- a/docs/zh-CN/index.html +++ b/docs/zh-CN/index.html @@ -18,7 +18,7 @@
Skip to content

iDraw.js

让Web绘图更加简单.

一个面向Web绘图的JavaScript框架

- + \ No newline at end of file