diff --git a/docs/docs/api/README.md b/docs/docs/api/README.md index 99017ca..b267002 100644 --- a/docs/docs/api/README.md +++ b/docs/docs/api/README.md @@ -1,3 +1,5 @@ +@fabwcie/drawer / [Exports](modules.md) + # Drawer ## Dependencies @@ -38,6 +40,18 @@ const $el = document.getElementById("myElement"); const drawer = new Drawer($el, { /** optional options */}); ``` +### Get Drawer instance of canvas + +Drawer instance stored into $canvas object directly, for example: + +```js +const $canvas = document.getElementById('canvas'); +const drawer = $canvas.drawer; + +drawer.changeTool('eraser'); +// ... +``` + ### Available options default options diff --git a/docs/docs/api/classes/Drawer.Drawer.md b/docs/docs/api/classes/Drawer.Drawer.md index e2c1364..0d30744 100644 --- a/docs/docs/api/classes/Drawer.Drawer.md +++ b/docs/docs/api/classes/Drawer.Drawer.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [Drawer](../modules/Drawer.md) / Drawer + # Class: Drawer [Drawer](../modules/Drawer.md).Drawer @@ -20,57 +22,24 @@ Winkler Fabien ### Properties -- [$brushBtn](Drawer.Drawer.md#$brushbtn) - [$canvas](Drawer.Drawer.md#$canvas) -- [$clearBtn](Drawer.Drawer.md#$clearbtn) -- [$colorPicker](Drawer.Drawer.md#$colorpicker) -- [$colorPickerLabel](Drawer.Drawer.md#$colorpickerlabel) -- [$downloadBtn](Drawer.Drawer.md#$downloadbtn) -- [$drawGroupBtn](Drawer.Drawer.md#$drawgroupbtn) -- [$drawGroupMenu](Drawer.Drawer.md#$drawgroupmenu) - [$drawerContainer](Drawer.Drawer.md#$drawercontainer) -- [$eraserBtn](Drawer.Drawer.md#$eraserbtn) -- [$lineThickness](Drawer.Drawer.md#$linethickness) -- [$redoBtn](Drawer.Drawer.md#$redobtn) -- [$settingBtn](Drawer.Drawer.md#$settingbtn) -- [$shapeBtn](Drawer.Drawer.md#$shapebtn) -- [$shapeMenu](Drawer.Drawer.md#$shapemenu) - [$sourceElement](Drawer.Drawer.md#$sourceelement) -- [$textBtn](Drawer.Drawer.md#$textbtn) -- [$toolbar](Drawer.Drawer.md#$toolbar) -- [$undoBtn](Drawer.Drawer.md#$undobtn) -- [$uploadFile](Drawer.Drawer.md#$uploadfile) - [VERSION](Drawer.Drawer.md#version) - [activeTool](Drawer.Drawer.md#activetool) - [ctx](Drawer.Drawer.md#ctx) -- [customBtn](Drawer.Drawer.md#custombtn) - [dotted](Drawer.Drawer.md#dotted) - [gridActive](Drawer.Drawer.md#gridactive) - [isDrawing](Drawer.Drawer.md#isdrawing) - [options](Drawer.Drawer.md#options) - [redo\_list](Drawer.Drawer.md#redo_list) - [settingModal](Drawer.Drawer.md#settingmodal) +- [toolbar](Drawer.Drawer.md#toolbar) - [undo\_list](Drawer.Drawer.md#undo_list) ### Methods -- [addBrushBtn](Drawer.Drawer.md#addbrushbtn) -- [addClearBtn](Drawer.Drawer.md#addclearbtn) -- [addColorPickerBtn](Drawer.Drawer.md#addcolorpickerbtn) -- [addCustomBtn](Drawer.Drawer.md#addcustombtn) -- [addDefaults](Drawer.Drawer.md#adddefaults) -- [addDownloadBtn](Drawer.Drawer.md#adddownloadbtn) -- [addDrawGroupBtn](Drawer.Drawer.md#adddrawgroupbtn) -- [addEraserBtn](Drawer.Drawer.md#adderaserbtn) - [addGrid](Drawer.Drawer.md#addgrid) -- [addLineThicknessBtn](Drawer.Drawer.md#addlinethicknessbtn) -- [addRedoBtn](Drawer.Drawer.md#addredobtn) -- [addSettingBtn](Drawer.Drawer.md#addsettingbtn) -- [addShapeBtn](Drawer.Drawer.md#addshapebtn) -- [addTextBtn](Drawer.Drawer.md#addtextbtn) -- [addToolbar](Drawer.Drawer.md#addtoolbar) -- [addUndoBtn](Drawer.Drawer.md#addundobtn) -- [addUploadFileBtn](Drawer.Drawer.md#adduploadfilebtn) - [changeTool](Drawer.Drawer.md#changetool) - [clear](Drawer.Drawer.md#clear) - [getData](Drawer.Drawer.md#getdata) @@ -82,7 +51,6 @@ Winkler Fabien - [restoreState](Drawer.Drawer.md#restorestate) - [saveDraw](Drawer.Drawer.md#savedraw) - [saveState](Drawer.Drawer.md#savestate) -- [setActiveBtn](Drawer.Drawer.md#setactivebtn) - [setBgColor](Drawer.Drawer.md#setbgcolor) - [setCanvas](Drawer.Drawer.md#setcanvas) - [setColor](Drawer.Drawer.md#setcolor) @@ -111,20 +79,10 @@ Winkler Fabien #### Defined in -[src/Drawer.ts:115](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L115) +[src/Drawer.ts:92](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L92) ## Properties -### $brushBtn - -• **$brushBtn**: ``null`` \| `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:78](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L78) - -___ - ### $canvas • **$canvas**: `HTMLCanvasElement` @@ -135,67 +93,7 @@ ___ #### Defined in -[src/Drawer.ts:72](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L72) - -___ - -### $clearBtn - -• **$clearBtn**: ``null`` \| `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:83](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L83) - -___ - -### $colorPicker - -• **$colorPicker**: ``null`` \| `HTMLInputElement` - -#### Defined in - -[src/Drawer.ts:86](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L86) - -___ - -### $colorPickerLabel - -• **$colorPickerLabel**: `HTMLLabelElement` - -#### Defined in - -[src/Drawer.ts:91](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L91) - -___ - -### $downloadBtn - -• **$downloadBtn**: ``null`` \| `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:85](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L85) - -___ - -### $drawGroupBtn - -• **$drawGroupBtn**: ``null`` \| `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:81](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L81) - -___ - -### $drawGroupMenu - -• **$drawGroupMenu**: ``null`` \| `HTMLUListElement` - -#### Defined in - -[src/Drawer.ts:82](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L82) +[src/Drawer.ts:64](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L64) ___ @@ -205,67 +103,7 @@ ___ #### Defined in -[src/Drawer.ts:74](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L74) - -___ - -### $eraserBtn - -• **$eraserBtn**: ``null`` \| `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:79](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L79) - -___ - -### $lineThickness - -• **$lineThickness**: `HTMLDivElement` - -#### Defined in - -[src/Drawer.ts:84](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L84) - -___ - -### $redoBtn - -• **$redoBtn**: ``null`` \| `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:77](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L77) - -___ - -### $settingBtn - -• **$settingBtn**: ``null`` \| `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:90](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L90) - -___ - -### $shapeBtn - -• **$shapeBtn**: ``null`` \| `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:87](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L87) - -___ - -### $shapeMenu - -• **$shapeMenu**: ``null`` \| `HTMLUListElement` - -#### Defined in - -[src/Drawer.ts:88](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L88) +[src/Drawer.ts:66](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L66) ___ @@ -275,47 +113,7 @@ ___ #### Defined in -[src/Drawer.ts:73](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L73) - -___ - -### $textBtn - -• **$textBtn**: ``null`` \| `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:80](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L80) - -___ - -### $toolbar - -• **$toolbar**: `HTMLDivElement` - -#### Defined in - -[src/Drawer.ts:75](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L75) - -___ - -### $undoBtn - -• **$undoBtn**: ``null`` \| `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:76](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L76) - -___ - -### $uploadFile - -• **$uploadFile**: ``null`` \| `HTMLInputElement` - -#### Defined in - -[src/Drawer.ts:89](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L89) +[src/Drawer.ts:65](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L65) ___ @@ -325,7 +123,7 @@ ___ #### Defined in -[src/Drawer.ts:108](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L108) +[src/Drawer.ts:83](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L83) ___ @@ -335,7 +133,7 @@ ___ #### Defined in -[src/Drawer.ts:66](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L66) +[src/Drawer.ts:59](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L59) ___ @@ -349,21 +147,7 @@ ___ #### Defined in -[src/Drawer.ts:64](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L64) - -___ - -### customBtn - -• **customBtn**: `Object` = `{}` - -#### Index signature - -▪ [key: `string`]: `HTMLButtonElement` - -#### Defined in - -[src/Drawer.ts:70](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L70) +[src/Drawer.ts:57](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L57) ___ @@ -373,7 +157,7 @@ ___ #### Defined in -[src/Drawer.ts:67](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L67) +[src/Drawer.ts:60](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L60) ___ @@ -383,7 +167,7 @@ ___ #### Defined in -[src/Drawer.ts:107](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L107) +[src/Drawer.ts:82](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L82) ___ @@ -393,7 +177,7 @@ ___ #### Defined in -[src/Drawer.ts:65](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L65) +[src/Drawer.ts:58](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L58) ___ @@ -403,7 +187,7 @@ ___ #### Defined in -[src/Drawer.ts:69](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L69) +[src/Drawer.ts:62](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L62) ___ @@ -417,7 +201,7 @@ ___ #### Defined in -[src/utils/History.ts:2](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L2) +[src/utils/History.ts:4](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L4) ___ @@ -427,206 +211,33 @@ ___ #### Defined in -[src/Drawer.ts:106](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L106) +[src/Drawer.ts:81](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L81) ___ -### undo\_list +### toolbar -• **undo\_list**: `string`[] = `[]` - -#### Inherited from - -[History](utils_History.History.md).[undo_list](utils_History.History.md#undo_list) +• **toolbar**: [`Toolbar`](ui_Toolbar.Toolbar.md) #### Defined in -[src/utils/History.ts:3](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L3) - -## Methods - -### addBrushBtn - -▸ **addBrushBtn**(`action?`): `Promise`<`HTMLButtonElement`\> - -Add brush button to toolbar if exist -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLButtonElement`\> - -#### Defined in - -[src/Drawer.ts:559](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L559) +[src/Drawer.ts:84](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L84) ___ -### addClearBtn - -▸ **addClearBtn**(`action?`): `Promise`<`HTMLButtonElement`\> - -Add clear button to toolbar if exist -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLButtonElement`\> - -#### Defined in - -[src/Drawer.ts:762](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L762) - -___ - -### addColorPickerBtn - -▸ **addColorPickerBtn**(`action?`): `Promise`<`HTMLInputElement`\> - -Add a colorpicker button -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it -using Coloris, for customisation please see here [https://github.com/mdbassit/Coloris](https://github.com/mdbassit/Coloris) - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLInputElement`\> | Action call after color selected | - -#### Returns - -`Promise`<`HTMLInputElement`\> - -#### Defined in - -[src/Drawer.ts:944](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L944) - -___ - -### addCustomBtn - -▸ **addCustomBtn**(`name`, `title`, `label`, `action`): `Promise`<`HTMLButtonElement`\> - -Add a custom button to toolbar -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `name` | `string` | Button name (must be unique) | -| `title` | `string` | Title for button | -| `label` | `string` | Label or icon | -| `action` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | Action to do onclick | - -#### Returns - -`Promise`<`HTMLButtonElement`\> - -#### Defined in - -[src/Drawer.ts:1125](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L1125) - -___ - -### addDefaults - -▸ **addDefaults**(): `void` - -Add default button to toolbar, -List of defaults buttons : -undo, redo, brush, eraser, text, clear, line thickness, colorpicker, upload, download, setting - -#### Returns - -`void` - -#### Defined in - -[src/Drawer.ts:464](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L464) - -___ - -### addDownloadBtn - -▸ **addDownloadBtn**(`action?`): `Promise`<`HTMLButtonElement`\> - -Add a download button -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLButtonElement`\> - -#### Defined in - -[src/Drawer.ts:1044](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L1044) - -___ - -### addDrawGroupBtn - -▸ **addDrawGroupBtn**(`action?`): `Promise`<`HTMLButtonElement`\> - -Add draw group button (contain brush, eraser and text zone) -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLButtonElement`\> - -#### Defined in - -[src/Drawer.ts:667](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L667) - -___ - -### addEraserBtn - -▸ **addEraserBtn**(`action?`): `Promise`<`HTMLButtonElement`\> - -Add eraser button to toolbar if exist -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters +### undo\_list -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | +• **undo\_list**: `string`[] = `[]` -#### Returns +#### Inherited from -`Promise`<`HTMLButtonElement`\> +[History](utils_History.History.md).[undo_list](utils_History.History.md#undo_list) #### Defined in -[src/Drawer.ts:595](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L595) +[src/utils/History.ts:5](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L5) -___ +## Methods ### addGrid @@ -640,190 +251,7 @@ Add a css grid for draw helping #### Defined in -[src/Drawer.ts:1567](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L1567) - -___ - -### addLineThicknessBtn - -▸ **addLineThicknessBtn**(`action?`): `Promise`<`HTMLInputElement`\> - -Add line thickness input range to toolbar if exist -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLInputElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLInputElement`\> - -HTML input range element - -#### Defined in - -[src/Drawer.ts:896](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L896) - -___ - -### addRedoBtn - -▸ **addRedoBtn**(`action?`): `Promise`<`HTMLButtonElement`\> - -Add brush button to toolbar if exist -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLButtonElement`\> - -#### Defined in - -[src/Drawer.ts:522](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L522) - -___ - -### addSettingBtn - -▸ **addSettingBtn**(`action?`): `Promise`<`HTMLButtonElement`\> - -Add a params button -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLButtonElement`\> - -#### Defined in - -[src/Drawer.ts:1088](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L1088) - -___ - -### addShapeBtn - -▸ **addShapeBtn**(`action?`): `Promise`<`HTMLButtonElement`\> - -Add text button to toolbar if exist -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLButtonElement`\> - -#### Defined in - -[src/Drawer.ts:798](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L798) - -___ - -### addTextBtn - -▸ **addTextBtn**(`action?`): `Promise`<`HTMLButtonElement`\> - -Add text button to toolbar if exist -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLButtonElement`\> - -#### Defined in - -[src/Drawer.ts:631](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L631) - -___ - -### addToolbar - -▸ **addToolbar**(): `Promise`<`HTMLDivElement`\> - -Adding an empty toolbar element - -#### Returns - -`Promise`<`HTMLDivElement`\> - -HTML toolbar element - -#### Defined in - -[src/Drawer.ts:429](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L429) - -___ - -### addUndoBtn - -▸ **addUndoBtn**(`action?`): `Promise`<`HTMLButtonElement`\> - -Add undo button to toolbar if exist -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLButtonElement`\> - -#### Defined in - -[src/Drawer.ts:485](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L485) - -___ - -### addUploadFileBtn - -▸ **addUploadFileBtn**(`action?`): `Promise`<`HTMLInputElement`\> - -Add upload file button -see [addToolbar](Drawer.Drawer.md#addtoolbar) before use it - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLInputElement`\> | method to call onclick | - -#### Returns - -`Promise`<`HTMLInputElement`\> - -HTML input range element - -#### Defined in - -[src/Drawer.ts:997](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L997) +[src/Drawer.ts:719](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L719) ___ @@ -845,7 +273,7 @@ Change tool #### Defined in -[src/Drawer.ts:302](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L302) +[src/Drawer.ts:254](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L254) ___ @@ -861,7 +289,7 @@ Clear all canvas #### Defined in -[src/Drawer.ts:344](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L344) +[src/Drawer.ts:296](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L296) ___ @@ -879,7 +307,7 @@ canvas png data #### Defined in -[src/Drawer.ts:421](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L421) +[src/Drawer.ts:373](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L373) ___ @@ -901,7 +329,7 @@ Check if canvas empty #### Defined in -[src/Drawer.ts:219](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L219) +[src/Drawer.ts:199](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L199) ___ @@ -917,7 +345,7 @@ Check if active tool is shape #### Defined in -[src/Drawer.ts:1309](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L1309) +[src/Drawer.ts:476](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L476) ___ @@ -939,17 +367,17 @@ Inject data to canvas #### Defined in -[src/Drawer.ts:371](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L371) +[src/Drawer.ts:323](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L323) ___ ### redo -▸ **redo**(): `void` +▸ **redo**(): `Promise`<`unknown`\> #### Returns -`void` +`Promise`<`unknown`\> #### Inherited from @@ -957,7 +385,7 @@ ___ #### Defined in -[src/utils/History.ts:20](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L20) +[src/utils/History.ts:28](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L28) ___ @@ -973,13 +401,13 @@ Remove a css grid for draw helping #### Defined in -[src/Drawer.ts:1575](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L1575) +[src/Drawer.ts:727](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L727) ___ ### restoreState -▸ **restoreState**(`pop`, `push`): `void` +▸ **restoreState**(`pop`, `push`, `cb?`): `void` #### Parameters @@ -987,6 +415,7 @@ ___ | :------ | :------ | | `pop` | `string`[] | | `push` | `string`[] | +| `cb?` | (`v`: `boolean`) => `void` | #### Returns @@ -998,7 +427,7 @@ ___ #### Defined in -[src/utils/History.ts:24](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L24) +[src/utils/History.ts:38](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L38) ___ @@ -1015,7 +444,7 @@ Drawer.options.localStorageKey #### Defined in -[src/Drawer.ts:405](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L405) +[src/Drawer.ts:357](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L357) ___ @@ -1040,29 +469,7 @@ ___ #### Defined in -[src/utils/History.ts:7](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L7) - -___ - -### setActiveBtn - -▸ **setActiveBtn**(`$btn`): `void` - -Apply active state to btn - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `$btn` | ``null`` \| `HTMLButtonElement` | Button to add active class | - -#### Returns - -`void` - -#### Defined in - -[src/Drawer.ts:1248](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L1248) +[src/utils/History.ts:9](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L9) ___ @@ -1084,7 +491,7 @@ Change css canvas background color (ignored on export) #### Defined in -[src/Drawer.ts:255](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L255) +[src/Drawer.ts:235](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L235) ___ @@ -1108,7 +515,7 @@ ___ #### Defined in -[src/utils/History.ts:50](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L50) +[src/utils/History.ts:66](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L66) ___ @@ -1130,7 +537,7 @@ Change drawing color #### Defined in -[src/Drawer.ts:229](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L229) +[src/Drawer.ts:209](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L209) ___ @@ -1153,7 +560,7 @@ Set line style dotted #### Defined in -[src/Drawer.ts:1225](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L1225) +[src/Drawer.ts:431](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L431) ___ @@ -1175,7 +582,7 @@ Set the line width #### Defined in -[src/Drawer.ts:1287](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L1287) +[src/Drawer.ts:454](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L454) ___ @@ -1197,7 +604,7 @@ Change drawing shape #### Defined in -[src/Drawer.ts:1175](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L1175) +[src/Drawer.ts:381](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L381) ___ @@ -1220,17 +627,17 @@ Set canvas sizing #### Defined in -[src/Drawer.ts:191](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/Drawer.ts#L191) +[src/Drawer.ts:171](https://github.com/fabwcie/drawer/blob/850d9ed/src/Drawer.ts#L171) ___ ### undo -▸ **undo**(): `void` +▸ **undo**(): `Promise`<`unknown`\> #### Returns -`void` +`Promise`<`unknown`\> #### Inherited from @@ -1238,4 +645,4 @@ ___ #### Defined in -[src/utils/History.ts:16](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L16) +[src/utils/History.ts:18](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L18) diff --git a/docs/docs/api/classes/ui_Modal.Modal.md b/docs/docs/api/classes/ui_Modal.Modal.md index f4e1097..dd0b743 100644 --- a/docs/docs/api/classes/ui_Modal.Modal.md +++ b/docs/docs/api/classes/ui_Modal.Modal.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [ui/Modal](../modules/ui_Modal.md) / Modal + # Class: Modal [ui/Modal](../modules/ui_Modal.md).Modal @@ -44,7 +46,7 @@ #### Defined in -[src/ui/Modal.ts:24](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L24) +[src/ui/Modal.ts:24](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L24) ## Properties @@ -54,7 +56,7 @@ #### Defined in -[src/ui/Modal.ts:22](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L22) +[src/ui/Modal.ts:22](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L22) ___ @@ -64,7 +66,7 @@ ___ #### Defined in -[src/ui/Modal.ts:16](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L16) +[src/ui/Modal.ts:16](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L16) ___ @@ -74,7 +76,7 @@ ___ #### Defined in -[src/ui/Modal.ts:18](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L18) +[src/ui/Modal.ts:18](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L18) ___ @@ -84,7 +86,7 @@ ___ #### Defined in -[src/ui/Modal.ts:19](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L19) +[src/ui/Modal.ts:19](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L19) ___ @@ -94,7 +96,7 @@ ___ #### Defined in -[src/ui/Modal.ts:17](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L17) +[src/ui/Modal.ts:17](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L17) ___ @@ -104,7 +106,7 @@ ___ #### Defined in -[src/ui/Modal.ts:21](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L21) +[src/ui/Modal.ts:21](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L21) ___ @@ -114,7 +116,7 @@ ___ #### Defined in -[src/ui/Modal.ts:20](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L20) +[src/ui/Modal.ts:20](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L20) ## Methods @@ -134,7 +136,7 @@ ___ #### Defined in -[src/ui/Modal.ts:108](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L108) +[src/ui/Modal.ts:108](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L108) ___ @@ -148,7 +150,7 @@ ___ #### Defined in -[src/ui/Modal.ts:134](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L134) +[src/ui/Modal.ts:134](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L134) ___ @@ -162,7 +164,7 @@ ___ #### Defined in -[src/ui/Modal.ts:123](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L123) +[src/ui/Modal.ts:123](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L123) ___ @@ -176,7 +178,7 @@ ___ #### Defined in -[src/ui/Modal.ts:130](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L130) +[src/ui/Modal.ts:130](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L130) ___ @@ -196,7 +198,7 @@ ___ #### Defined in -[src/ui/Modal.ts:104](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L104) +[src/ui/Modal.ts:104](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L104) ___ @@ -216,7 +218,7 @@ ___ #### Defined in -[src/ui/Modal.ts:112](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L112) +[src/ui/Modal.ts:112](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L112) ___ @@ -236,7 +238,7 @@ ___ #### Defined in -[src/ui/Modal.ts:98](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L98) +[src/ui/Modal.ts:98](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L98) ___ @@ -250,4 +252,4 @@ ___ #### Defined in -[src/ui/Modal.ts:116](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Modal.ts#L116) +[src/ui/Modal.ts:116](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Modal.ts#L116) diff --git a/docs/docs/api/classes/ui_Toolbar.Toolbar.md b/docs/docs/api/classes/ui_Toolbar.Toolbar.md index f3a91a1..1478574 100644 --- a/docs/docs/api/classes/ui_Toolbar.Toolbar.md +++ b/docs/docs/api/classes/ui_Toolbar.Toolbar.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [ui/Toolbar](../modules/ui_Toolbar.md) / Toolbar + # Class: Toolbar [ui/Toolbar](../modules/ui_Toolbar.md).Toolbar @@ -10,9 +12,50 @@ ### Properties +- [$brushBtn](ui_Toolbar.Toolbar.md#$brushbtn) +- [$clearBtn](ui_Toolbar.Toolbar.md#$clearbtn) +- [$colorPicker](ui_Toolbar.Toolbar.md#$colorpicker) +- [$colorPickerLabel](ui_Toolbar.Toolbar.md#$colorpickerlabel) +- [$downloadBtn](ui_Toolbar.Toolbar.md#$downloadbtn) +- [$drawGroupBtn](ui_Toolbar.Toolbar.md#$drawgroupbtn) +- [$drawGroupMenu](ui_Toolbar.Toolbar.md#$drawgroupmenu) +- [$eraserBtn](ui_Toolbar.Toolbar.md#$eraserbtn) +- [$lineThickness](ui_Toolbar.Toolbar.md#$linethickness) +- [$redoBtn](ui_Toolbar.Toolbar.md#$redobtn) +- [$settingBtn](ui_Toolbar.Toolbar.md#$settingbtn) +- [$shapeBtn](ui_Toolbar.Toolbar.md#$shapebtn) +- [$shapeMenu](ui_Toolbar.Toolbar.md#$shapemenu) +- [$textBtn](ui_Toolbar.Toolbar.md#$textbtn) +- [$toolbar](ui_Toolbar.Toolbar.md#$toolbar) +- [$undoBtn](ui_Toolbar.Toolbar.md#$undobtn) +- [$uploadFile](ui_Toolbar.Toolbar.md#$uploadfile) +- [customBtn](ui_Toolbar.Toolbar.md#custombtn) - [drawer](ui_Toolbar.Toolbar.md#drawer) - [options](ui_Toolbar.Toolbar.md#options) +### Methods + +- [\_initClickOutsideMenuEvent](ui_Toolbar.Toolbar.md#_initclickoutsidemenuevent) +- [\_manageUndoRedoBtn](ui_Toolbar.Toolbar.md#_manageundoredobtn) +- [\_toggleMenu](ui_Toolbar.Toolbar.md#_togglemenu) +- [addBrushBtn](ui_Toolbar.Toolbar.md#addbrushbtn) +- [addClearBtn](ui_Toolbar.Toolbar.md#addclearbtn) +- [addColorPickerBtn](ui_Toolbar.Toolbar.md#addcolorpickerbtn) +- [addCustomBtn](ui_Toolbar.Toolbar.md#addcustombtn) +- [addDefaults](ui_Toolbar.Toolbar.md#adddefaults) +- [addDownloadBtn](ui_Toolbar.Toolbar.md#adddownloadbtn) +- [addDrawGroupBtn](ui_Toolbar.Toolbar.md#adddrawgroupbtn) +- [addEraserBtn](ui_Toolbar.Toolbar.md#adderaserbtn) +- [addLineThicknessBtn](ui_Toolbar.Toolbar.md#addlinethicknessbtn) +- [addRedoBtn](ui_Toolbar.Toolbar.md#addredobtn) +- [addSettingBtn](ui_Toolbar.Toolbar.md#addsettingbtn) +- [addShapeBtn](ui_Toolbar.Toolbar.md#addshapebtn) +- [addTextBtn](ui_Toolbar.Toolbar.md#addtextbtn) +- [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) +- [addUndoBtn](ui_Toolbar.Toolbar.md#addundobtn) +- [addUploadFileBtn](ui_Toolbar.Toolbar.md#adduploadfilebtn) +- [setActiveBtn](ui_Toolbar.Toolbar.md#setactivebtn) + ## Constructors ### constructor @@ -28,17 +71,201 @@ #### Defined in -[src/ui/Toolbar.ts:10](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Toolbar.ts#L10) +[src/ui/Toolbar.ts:56](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L56) ## Properties +### $brushBtn + +• **$brushBtn**: ``null`` \| `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:39](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L39) + +___ + +### $clearBtn + +• **$clearBtn**: ``null`` \| `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:44](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L44) + +___ + +### $colorPicker + +• **$colorPicker**: ``null`` \| `HTMLInputElement` + +#### Defined in + +[src/ui/Toolbar.ts:47](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L47) + +___ + +### $colorPickerLabel + +• **$colorPickerLabel**: `HTMLLabelElement` + +#### Defined in + +[src/ui/Toolbar.ts:52](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L52) + +___ + +### $downloadBtn + +• **$downloadBtn**: ``null`` \| `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:46](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L46) + +___ + +### $drawGroupBtn + +• **$drawGroupBtn**: ``null`` \| `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:42](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L42) + +___ + +### $drawGroupMenu + +• **$drawGroupMenu**: ``null`` \| `HTMLUListElement` + +#### Defined in + +[src/ui/Toolbar.ts:43](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L43) + +___ + +### $eraserBtn + +• **$eraserBtn**: ``null`` \| `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:40](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L40) + +___ + +### $lineThickness + +• **$lineThickness**: ``null`` \| `HTMLDivElement` + +#### Defined in + +[src/ui/Toolbar.ts:45](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L45) + +___ + +### $redoBtn + +• **$redoBtn**: ``null`` \| `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:38](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L38) + +___ + +### $settingBtn + +• **$settingBtn**: ``null`` \| `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:51](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L51) + +___ + +### $shapeBtn + +• **$shapeBtn**: ``null`` \| `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:48](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L48) + +___ + +### $shapeMenu + +• **$shapeMenu**: ``null`` \| `HTMLUListElement` + +#### Defined in + +[src/ui/Toolbar.ts:49](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L49) + +___ + +### $textBtn + +• **$textBtn**: ``null`` \| `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:41](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L41) + +___ + +### $toolbar + +• **$toolbar**: `HTMLDivElement` + +#### Defined in + +[src/ui/Toolbar.ts:36](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L36) + +___ + +### $undoBtn + +• **$undoBtn**: ``null`` \| `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:37](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L37) + +___ + +### $uploadFile + +• **$uploadFile**: ``null`` \| `HTMLInputElement` + +#### Defined in + +[src/ui/Toolbar.ts:50](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L50) + +___ + +### customBtn + +• **customBtn**: `Object` = `{}` + +#### Index signature + +▪ [key: `string`]: `HTMLButtonElement` + +#### Defined in + +[src/ui/Toolbar.ts:54](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L54) + +___ + ### drawer • **drawer**: [`Drawer`](Drawer.Drawer.md) #### Defined in -[src/ui/Toolbar.ts:7](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Toolbar.ts#L7) +[src/ui/Toolbar.ts:33](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L33) ___ @@ -48,4 +275,452 @@ ___ #### Defined in -[src/ui/Toolbar.ts:8](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/ui/Toolbar.ts#L8) +[src/ui/Toolbar.ts:34](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L34) + +## Methods + +### \_initClickOutsideMenuEvent + +▸ **_initClickOutsideMenuEvent**(`$btn`, `$menu`): `void` + +event for close menu on click outside + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `$btn` | `HTMLButtonElement` | +| `$menu` | `HTMLUListElement` | + +#### Returns + +`void` + +#### Defined in + +[src/ui/Toolbar.ts:854](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L854) + +___ + +### \_manageUndoRedoBtn + +▸ **_manageUndoRedoBtn**(): `void` + +#### Returns + +`void` + +#### Defined in + +[src/ui/Toolbar.ts:807](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L807) + +___ + +### \_toggleMenu + +▸ **_toggleMenu**(`$btn`, `$menu`): `void` + +Toggle show/hide menu + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `$btn` | `HTMLButtonElement` | +| `$menu` | `HTMLUListElement` | + +#### Returns + +`void` + +#### Defined in + +[src/ui/Toolbar.ts:827](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L827) + +___ + +### addBrushBtn + +▸ **addBrushBtn**(`action?`): `Promise`<`HTMLButtonElement`\> + +Add brush button to toolbar if exist +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:199](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L199) + +___ + +### addClearBtn + +▸ **addClearBtn**(`action?`): `Promise`<`HTMLButtonElement`\> + +Add clear button to toolbar if exist +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:386](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L386) + +___ + +### addColorPickerBtn + +▸ **addColorPickerBtn**(`action?`): `Promise`<`HTMLInputElement`\> + +Add a colorpicker button +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it +using Coloris, for customisation please see here [https://github.com/mdbassit/Coloris](https://github.com/mdbassit/Coloris) + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLInputElement`\> | Action call after color selected | + +#### Returns + +`Promise`<`HTMLInputElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:545](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L545) + +___ + +### addCustomBtn + +▸ **addCustomBtn**(`name`, `title`, `label`, `action`): `Promise`<`HTMLButtonElement`\> + +Add a custom button to toolbar +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `name` | `string` | Button name (must be unique) | +| `title` | `string` | Title for button | +| `label` | `string` | Label or icon | +| `action` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | Action to do onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:722](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L722) + +___ + +### addDefaults + +▸ **addDefaults**(): `void` + +Add default button to toolbar, +List of defaults buttons : +undo, redo, brush, eraser, text, clear, line thickness, colorpicker, upload, download, setting + +#### Returns + +`void` + +#### Defined in + +[src/ui/Toolbar.ts:100](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L100) + +___ + +### addDownloadBtn + +▸ **addDownloadBtn**(`action?`): `Promise`<`HTMLButtonElement`\> + +Add a download button +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:645](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L645) + +___ + +### addDrawGroupBtn + +▸ **addDrawGroupBtn**(`action?`): `Promise`<`HTMLButtonElement`\> + +Add draw group button (contain brush, eraser and text zone) +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:307](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L307) + +___ + +### addEraserBtn + +▸ **addEraserBtn**(`action?`): `Promise`<`HTMLButtonElement`\> + +Add eraser button to toolbar if exist +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:235](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L235) + +___ + +### addLineThicknessBtn + +▸ **addLineThicknessBtn**(`action?`): `Promise`<`HTMLInputElement`\> + +Add line thickness input range to toolbar if exist +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLInputElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLInputElement`\> + +HTML input range element + +#### Defined in + +[src/ui/Toolbar.ts:497](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L497) + +___ + +### addRedoBtn + +▸ **addRedoBtn**(`action?`): `Promise`<`HTMLButtonElement`\> + +Add brush button to toolbar if exist +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:160](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L160) + +___ + +### addSettingBtn + +▸ **addSettingBtn**(`action?`): `Promise`<`HTMLButtonElement`\> + +Add a params button +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:685](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L685) + +___ + +### addShapeBtn + +▸ **addShapeBtn**(`action?`): `Promise`<`HTMLButtonElement`\> + +Add text button to toolbar if exist +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:424](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L424) + +___ + +### addTextBtn + +▸ **addTextBtn**(`action?`): `Promise`<`HTMLButtonElement`\> + +Add text button to toolbar if exist +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:271](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L271) + +___ + +### addToolbar + +▸ **addToolbar**(): `Promise`<`HTMLDivElement`\> + +Adding an empty toolbar element + +#### Returns + +`Promise`<`HTMLDivElement`\> + +HTML toolbar element + +#### Defined in + +[src/ui/Toolbar.ts:65](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L65) + +___ + +### addUndoBtn + +▸ **addUndoBtn**(`action?`): `Promise`<`HTMLButtonElement`\> + +Add undo button to toolbar if exist +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLButtonElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLButtonElement`\> + +#### Defined in + +[src/ui/Toolbar.ts:121](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L121) + +___ + +### addUploadFileBtn + +▸ **addUploadFileBtn**(`action?`): `Promise`<`HTMLInputElement`\> + +Add upload file button +see [addToolbar](ui_Toolbar.Toolbar.md#addtoolbar) before use it + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `action?` | [`action`](../modules/types_drawer.md#action)<`HTMLInputElement`\> | method to call onclick | + +#### Returns + +`Promise`<`HTMLInputElement`\> + +HTML input range element + +#### Defined in + +[src/ui/Toolbar.ts:598](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L598) + +___ + +### setActiveBtn + +▸ **setActiveBtn**(`$btn`): `void` + +Apply active state to btn + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `$btn` | ``null`` \| `HTMLButtonElement` | Button to add active class | + +#### Returns + +`void` + +#### Defined in + +[src/ui/Toolbar.ts:757](https://github.com/fabwcie/drawer/blob/850d9ed/src/ui/Toolbar.ts#L757) diff --git a/docs/docs/api/classes/utils_DrawError.DrawerError.md b/docs/docs/api/classes/utils_DrawError.DrawerError.md index 968abee..efdbc25 100644 --- a/docs/docs/api/classes/utils_DrawError.DrawerError.md +++ b/docs/docs/api/classes/utils_DrawError.DrawerError.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [utils/DrawError](../modules/utils_DrawError.md) / DrawerError + # Class: DrawerError [utils/DrawError](../modules/utils_DrawError.md).DrawerError @@ -45,7 +47,7 @@ Error.constructor #### Defined in -[src/utils/DrawError.ts:2](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/DrawError.ts#L2) +[src/utils/DrawError.ts:2](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/DrawError.ts#L2) ## Properties diff --git a/docs/docs/api/classes/utils_History.History.md b/docs/docs/api/classes/utils_History.History.md index 24e7854..b88ef17 100644 --- a/docs/docs/api/classes/utils_History.History.md +++ b/docs/docs/api/classes/utils_History.History.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [utils/History](../modules/utils_History.md) / History + # Class: History [utils/History](../modules/utils_History.md).History @@ -43,7 +45,7 @@ #### Defined in -[src/utils/History.ts:4](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L4) +[src/utils/History.ts:6](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L6) ___ @@ -53,7 +55,7 @@ ___ #### Defined in -[src/utils/History.ts:5](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L5) +[src/utils/History.ts:7](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L7) ___ @@ -63,7 +65,7 @@ ___ #### Defined in -[src/utils/History.ts:2](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L2) +[src/utils/History.ts:4](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L4) ___ @@ -73,27 +75,27 @@ ___ #### Defined in -[src/utils/History.ts:3](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L3) +[src/utils/History.ts:5](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L5) ## Methods ### redo -▸ **redo**(): `void` +▸ **redo**(): `Promise`<`unknown`\> #### Returns -`void` +`Promise`<`unknown`\> #### Defined in -[src/utils/History.ts:20](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L20) +[src/utils/History.ts:28](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L28) ___ ### restoreState -▸ **restoreState**(`pop`, `push`): `void` +▸ **restoreState**(`pop`, `push`, `cb?`): `void` #### Parameters @@ -101,6 +103,7 @@ ___ | :------ | :------ | | `pop` | `string`[] | | `push` | `string`[] | +| `cb?` | (`v`: `boolean`) => `void` | #### Returns @@ -108,7 +111,7 @@ ___ #### Defined in -[src/utils/History.ts:24](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L24) +[src/utils/History.ts:38](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L38) ___ @@ -129,7 +132,7 @@ ___ #### Defined in -[src/utils/History.ts:7](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L7) +[src/utils/History.ts:9](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L9) ___ @@ -149,18 +152,18 @@ ___ #### Defined in -[src/utils/History.ts:50](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L50) +[src/utils/History.ts:66](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L66) ___ ### undo -▸ **undo**(): `void` +▸ **undo**(): `Promise`<`unknown`\> #### Returns -`void` +`Promise`<`unknown`\> #### Defined in -[src/utils/History.ts:16](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/History.ts#L16) +[src/utils/History.ts:18](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/History.ts#L18) diff --git a/docs/docs/api/enums/types_drawer.DrawTools.md b/docs/docs/api/enums/types_drawer.DrawTools.md index 7d49ef4..c701750 100644 --- a/docs/docs/api/enums/types_drawer.DrawTools.md +++ b/docs/docs/api/enums/types_drawer.DrawTools.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [types/drawer](../modules/types_drawer.md) / DrawTools + # Enumeration: DrawTools [types/drawer](../modules/types_drawer.md).DrawTools @@ -26,7 +28,7 @@ #### Defined in -[src/types/drawer.d.ts:33](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L33) +[src/types/drawer.d.ts:33](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L33) ___ @@ -36,7 +38,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:27](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L27) +[src/types/drawer.d.ts:27](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L27) ___ @@ -46,7 +48,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:31](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L31) +[src/types/drawer.d.ts:31](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L31) ___ @@ -56,7 +58,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:28](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L28) +[src/types/drawer.d.ts:28](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L28) ___ @@ -66,7 +68,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:34](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L34) +[src/types/drawer.d.ts:34](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L34) ___ @@ -76,7 +78,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:37](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L37) +[src/types/drawer.d.ts:37](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L37) ___ @@ -86,7 +88,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:30](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L30) +[src/types/drawer.d.ts:30](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L30) ___ @@ -96,7 +98,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:32](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L32) +[src/types/drawer.d.ts:32](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L32) ___ @@ -106,7 +108,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:35](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L35) +[src/types/drawer.d.ts:35](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L35) ___ @@ -116,7 +118,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:29](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L29) +[src/types/drawer.d.ts:29](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L29) ___ @@ -126,4 +128,4 @@ ___ #### Defined in -[src/types/drawer.d.ts:36](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L36) +[src/types/drawer.d.ts:36](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L36) diff --git a/docs/docs/api/enums/types_drawer.ToolbarPosition.md b/docs/docs/api/enums/types_drawer.ToolbarPosition.md index ef9aa22..29e1baf 100644 --- a/docs/docs/api/enums/types_drawer.ToolbarPosition.md +++ b/docs/docs/api/enums/types_drawer.ToolbarPosition.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [types/drawer](../modules/types_drawer.md) / ToolbarPosition + # Enumeration: ToolbarPosition [types/drawer](../modules/types_drawer.md).ToolbarPosition @@ -23,7 +25,7 @@ #### Defined in -[src/types/drawer.d.ts:47](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L47) +[src/types/drawer.d.ts:47](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L47) ___ @@ -33,7 +35,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:46](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L46) +[src/types/drawer.d.ts:46](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L46) ___ @@ -43,7 +45,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:48](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L48) +[src/types/drawer.d.ts:48](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L48) ___ @@ -53,7 +55,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:45](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L45) +[src/types/drawer.d.ts:45](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L45) ___ @@ -63,7 +65,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:43](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L43) +[src/types/drawer.d.ts:43](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L43) ___ @@ -73,7 +75,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:42](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L42) +[src/types/drawer.d.ts:42](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L42) ___ @@ -83,7 +85,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:44](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L44) +[src/types/drawer.d.ts:44](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L44) ___ @@ -93,4 +95,4 @@ ___ #### Defined in -[src/types/drawer.d.ts:41](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L41) +[src/types/drawer.d.ts:41](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L41) diff --git a/docs/docs/api/interfaces/types_drawer.DrawerOptions.md b/docs/docs/api/interfaces/types_drawer.DrawerOptions.md index 1f6630f..7abfa48 100644 --- a/docs/docs/api/interfaces/types_drawer.DrawerOptions.md +++ b/docs/docs/api/interfaces/types_drawer.DrawerOptions.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [types/drawer](../modules/types_drawer.md) / DrawerOptions + # Interface: DrawerOptions [types/drawer](../modules/types_drawer.md).DrawerOptions @@ -35,7 +37,7 @@ #### Defined in -[src/types/drawer.d.ts:9](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L9) +[src/types/drawer.d.ts:9](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L9) ___ @@ -45,7 +47,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:16](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L16) +[src/types/drawer.d.ts:16](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L16) ___ @@ -55,7 +57,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:17](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L17) +[src/types/drawer.d.ts:17](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L17) ___ @@ -65,7 +67,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:12](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L12) +[src/types/drawer.d.ts:12](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L12) ___ @@ -75,7 +77,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:14](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L14) +[src/types/drawer.d.ts:14](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L14) ___ @@ -85,7 +87,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:11](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L11) +[src/types/drawer.d.ts:11](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L11) ___ @@ -95,7 +97,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:8](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L8) +[src/types/drawer.d.ts:8](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L8) ___ @@ -105,7 +107,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:3](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L3) +[src/types/drawer.d.ts:3](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L3) ___ @@ -115,7 +117,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:7](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L7) +[src/types/drawer.d.ts:7](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L7) ___ @@ -125,7 +127,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:15](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L15) +[src/types/drawer.d.ts:15](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L15) ___ @@ -135,7 +137,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:18](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L18) +[src/types/drawer.d.ts:18](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L18) ___ @@ -145,7 +147,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:19](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L19) +[src/types/drawer.d.ts:19](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L19) ___ @@ -155,7 +157,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:4](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L4) +[src/types/drawer.d.ts:4](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L4) ___ @@ -165,7 +167,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:2](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L2) +[src/types/drawer.d.ts:2](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L2) ___ @@ -175,7 +177,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:13](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L13) +[src/types/drawer.d.ts:13](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L13) ___ @@ -185,7 +187,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:6](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L6) +[src/types/drawer.d.ts:6](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L6) ___ @@ -195,7 +197,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:20](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L20) +[src/types/drawer.d.ts:20](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L20) ___ @@ -205,7 +207,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:10](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L10) +[src/types/drawer.d.ts:10](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L10) ___ @@ -215,7 +217,7 @@ ___ #### Defined in -[src/types/drawer.d.ts:5](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L5) +[src/types/drawer.d.ts:5](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L5) ___ @@ -225,4 +227,4 @@ ___ #### Defined in -[src/types/drawer.d.ts:21](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L21) +[src/types/drawer.d.ts:21](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L21) diff --git a/docs/docs/api/interfaces/types_drawer.Position.md b/docs/docs/api/interfaces/types_drawer.Position.md index 3f8bad8..d4154cd 100644 --- a/docs/docs/api/interfaces/types_drawer.Position.md +++ b/docs/docs/api/interfaces/types_drawer.Position.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [types/drawer](../modules/types_drawer.md) / Position + # Interface: Position [types/drawer](../modules/types_drawer.md).Position @@ -17,7 +19,7 @@ #### Defined in -[src/types/drawer.d.ts:52](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L52) +[src/types/drawer.d.ts:52](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L52) ___ @@ -27,4 +29,4 @@ ___ #### Defined in -[src/types/drawer.d.ts:53](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L53) +[src/types/drawer.d.ts:53](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L53) diff --git a/docs/docs/api/interfaces/types_modal.ModalOptions.md b/docs/docs/api/interfaces/types_modal.ModalOptions.md index 799e7f5..05daf26 100644 --- a/docs/docs/api/interfaces/types_modal.ModalOptions.md +++ b/docs/docs/api/interfaces/types_modal.ModalOptions.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [types/modal](../modules/types_modal.md) / ModalOptions + # Interface: ModalOptions [types/modal](../modules/types_modal.md).ModalOptions @@ -21,7 +23,7 @@ #### Defined in -[src/types/modal.d.ts:7](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/modal.d.ts#L7) +[src/types/modal.d.ts:7](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/modal.d.ts#L7) ___ @@ -31,7 +33,7 @@ ___ #### Defined in -[src/types/modal.d.ts:4](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/modal.d.ts#L4) +[src/types/modal.d.ts:4](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/modal.d.ts#L4) ___ @@ -41,7 +43,7 @@ ___ #### Defined in -[src/types/modal.d.ts:6](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/modal.d.ts#L6) +[src/types/modal.d.ts:6](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/modal.d.ts#L6) ___ @@ -51,7 +53,7 @@ ___ #### Defined in -[src/types/modal.d.ts:5](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/modal.d.ts#L5) +[src/types/modal.d.ts:5](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/modal.d.ts#L5) ___ @@ -61,7 +63,7 @@ ___ #### Defined in -[src/types/modal.d.ts:3](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/modal.d.ts#L3) +[src/types/modal.d.ts:3](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/modal.d.ts#L3) ___ @@ -71,4 +73,4 @@ ___ #### Defined in -[src/types/modal.d.ts:2](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/modal.d.ts#L2) +[src/types/modal.d.ts:2](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/modal.d.ts#L2) diff --git a/docs/docs/api/interfaces/types_toolbar.ToolbarOptions.md b/docs/docs/api/interfaces/types_toolbar.ToolbarOptions.md index a1ef13b..1ac3f96 100644 --- a/docs/docs/api/interfaces/types_toolbar.ToolbarOptions.md +++ b/docs/docs/api/interfaces/types_toolbar.ToolbarOptions.md @@ -1,3 +1,21 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / [types/toolbar](../modules/types_toolbar.md) / ToolbarOptions + # Interface: ToolbarOptions [types/toolbar](../modules/types_toolbar.md).ToolbarOptions + +## Table of contents + +### Properties + +- [toolbarPosition](types_toolbar.ToolbarOptions.md#toolbarposition) + +## Properties + +### toolbarPosition + +• **toolbarPosition**: ``"outerTop"`` \| ``"outerEnd"`` \| ``"outerBottom"`` \| ``"outerStart"`` \| ``"innerTop"`` \| ``"innerEnd"`` \| ``"innerBottom"`` \| ``"innerStart"`` + +#### Defined in + +[src/types/toolbar.d.ts:4](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/toolbar.d.ts#L4) diff --git a/docs/docs/api/modules.md b/docs/docs/api/modules.md index fc55794..244c5dd 100644 --- a/docs/docs/api/modules.md +++ b/docs/docs/api/modules.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](README.md) / Exports + # @fabwcie/drawer ## Table of contents @@ -5,7 +7,6 @@ ### Modules - [Drawer](modules/Drawer.md) -- [SVGDrawer](modules/SVGDrawer.md) - [icons/arrow](modules/icons_arrow.md) - [icons/brush](modules/icons_brush.md) - [icons/circle](modules/icons_circle.md) @@ -25,8 +26,6 @@ - [icons/triangle](modules/icons_triangle.md) - [icons/undo](modules/icons_undo.md) - [icons/upload](modules/icons_upload.md) -- [tools/Toolbar](modules/tools_Toolbar.md) -- [tools/Undo](modules/tools_Undo.md) - [types/drawer](modules/types_drawer.md) - [types/modal](modules/types_modal.md) - [types/toolbar](modules/types_toolbar.md) diff --git a/docs/docs/api/modules/Drawer.md b/docs/docs/api/modules/Drawer.md index 893fe68..4a00f27 100644 --- a/docs/docs/api/modules/Drawer.md +++ b/docs/docs/api/modules/Drawer.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / Drawer + # Module: Drawer ## Table of contents diff --git a/docs/docs/api/modules/SVGDrawer.md b/docs/docs/api/modules/SVGDrawer.md deleted file mode 100644 index d6d2aa3..0000000 --- a/docs/docs/api/modules/SVGDrawer.md +++ /dev/null @@ -1 +0,0 @@ -# Module: SVGDrawer diff --git a/docs/docs/api/modules/icons_arrow.md b/docs/docs/api/modules/icons_arrow.md index c761758..4814f14 100644 --- a/docs/docs/api/modules/icons_arrow.md +++ b/docs/docs/api/modules/icons_arrow.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/arrow + # Module: icons/arrow ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/arrow.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/arrow.ts#L1) +[src/icons/arrow.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/arrow.ts#L1) diff --git a/docs/docs/api/modules/icons_brush.md b/docs/docs/api/modules/icons_brush.md index ddb10ed..e3c582a 100644 --- a/docs/docs/api/modules/icons_brush.md +++ b/docs/docs/api/modules/icons_brush.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/brush + # Module: icons/brush ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/brush.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/brush.ts#L1) +[src/icons/brush.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/brush.ts#L1) diff --git a/docs/docs/api/modules/icons_circle.md b/docs/docs/api/modules/icons_circle.md index 71a06d4..8c6a3a9 100644 --- a/docs/docs/api/modules/icons_circle.md +++ b/docs/docs/api/modules/icons_circle.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/circle + # Module: icons/circle ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/circle.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/circle.ts#L1) +[src/icons/circle.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/circle.ts#L1) diff --git a/docs/docs/api/modules/icons_clear.md b/docs/docs/api/modules/icons_clear.md index 74f441a..6fd37b1 100644 --- a/docs/docs/api/modules/icons_clear.md +++ b/docs/docs/api/modules/icons_clear.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/clear + # Module: icons/clear ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/clear.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/clear.ts#L1) +[src/icons/clear.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/clear.ts#L1) diff --git a/docs/docs/api/modules/icons_close.md b/docs/docs/api/modules/icons_close.md index cf98739..bb4ac71 100644 --- a/docs/docs/api/modules/icons_close.md +++ b/docs/docs/api/modules/icons_close.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/close + # Module: icons/close ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/close.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/close.ts#L1) +[src/icons/close.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/close.ts#L1) diff --git a/docs/docs/api/modules/icons_color.md b/docs/docs/api/modules/icons_color.md index 34515e3..ef0514a 100644 --- a/docs/docs/api/modules/icons_color.md +++ b/docs/docs/api/modules/icons_color.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/color + # Module: icons/color ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/color.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/color.ts#L1) +[src/icons/color.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/color.ts#L1) diff --git a/docs/docs/api/modules/icons_download.md b/docs/docs/api/modules/icons_download.md index 8c88c99..f0c4f86 100644 --- a/docs/docs/api/modules/icons_download.md +++ b/docs/docs/api/modules/icons_download.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/download + # Module: icons/download ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/download.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/download.ts#L1) +[src/icons/download.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/download.ts#L1) diff --git a/docs/docs/api/modules/icons_eraser.md b/docs/docs/api/modules/icons_eraser.md index 586f03d..d8907f1 100644 --- a/docs/docs/api/modules/icons_eraser.md +++ b/docs/docs/api/modules/icons_eraser.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/eraser + # Module: icons/eraser ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/eraser.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/eraser.ts#L1) +[src/icons/eraser.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/eraser.ts#L1) diff --git a/docs/docs/api/modules/icons_line.md b/docs/docs/api/modules/icons_line.md index 9342152..219dea8 100644 --- a/docs/docs/api/modules/icons_line.md +++ b/docs/docs/api/modules/icons_line.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/line + # Module: icons/line ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/line.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/line.ts#L1) +[src/icons/line.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/line.ts#L1) diff --git a/docs/docs/api/modules/icons_rect.md b/docs/docs/api/modules/icons_rect.md index 78e5d02..fd543c3 100644 --- a/docs/docs/api/modules/icons_rect.md +++ b/docs/docs/api/modules/icons_rect.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/rect + # Module: icons/rect ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/rect.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/rect.ts#L1) +[src/icons/rect.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/rect.ts#L1) diff --git a/docs/docs/api/modules/icons_redo.md b/docs/docs/api/modules/icons_redo.md index ddfbfab..f2643db 100644 --- a/docs/docs/api/modules/icons_redo.md +++ b/docs/docs/api/modules/icons_redo.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/redo + # Module: icons/redo ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/redo.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/redo.ts#L1) +[src/icons/redo.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/redo.ts#L1) diff --git a/docs/docs/api/modules/icons_setting.md b/docs/docs/api/modules/icons_setting.md index 0cbb3a6..7aede6f 100644 --- a/docs/docs/api/modules/icons_setting.md +++ b/docs/docs/api/modules/icons_setting.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/setting + # Module: icons/setting ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/setting.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/setting.ts#L1) +[src/icons/setting.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/setting.ts#L1) diff --git a/docs/docs/api/modules/icons_shape.md b/docs/docs/api/modules/icons_shape.md index 4ac62e6..d1bc4df 100644 --- a/docs/docs/api/modules/icons_shape.md +++ b/docs/docs/api/modules/icons_shape.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/shape + # Module: icons/shape ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/shape.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/shape.ts#L1) +[src/icons/shape.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/shape.ts#L1) diff --git a/docs/docs/api/modules/icons_square.md b/docs/docs/api/modules/icons_square.md index 1120633..ce509d6 100644 --- a/docs/docs/api/modules/icons_square.md +++ b/docs/docs/api/modules/icons_square.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/square + # Module: icons/square ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/square.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/square.ts#L1) +[src/icons/square.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/square.ts#L1) diff --git a/docs/docs/api/modules/icons_star.md b/docs/docs/api/modules/icons_star.md index 198da6b..ff13c0d 100644 --- a/docs/docs/api/modules/icons_star.md +++ b/docs/docs/api/modules/icons_star.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/star + # Module: icons/star ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/star.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/star.ts#L1) +[src/icons/star.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/star.ts#L1) diff --git a/docs/docs/api/modules/icons_text.md b/docs/docs/api/modules/icons_text.md index 37c0874..05ab5f4 100644 --- a/docs/docs/api/modules/icons_text.md +++ b/docs/docs/api/modules/icons_text.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/text + # Module: icons/text ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/text.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/text.ts#L1) +[src/icons/text.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/text.ts#L1) diff --git a/docs/docs/api/modules/icons_triangle.md b/docs/docs/api/modules/icons_triangle.md index 0bc39a4..423e2e0 100644 --- a/docs/docs/api/modules/icons_triangle.md +++ b/docs/docs/api/modules/icons_triangle.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/triangle + # Module: icons/triangle ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/triangle.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/triangle.ts#L1) +[src/icons/triangle.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/triangle.ts#L1) diff --git a/docs/docs/api/modules/icons_undo.md b/docs/docs/api/modules/icons_undo.md index 4f0399e..a5988de 100644 --- a/docs/docs/api/modules/icons_undo.md +++ b/docs/docs/api/modules/icons_undo.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/undo + # Module: icons/undo ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/undo.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/undo.ts#L1) +[src/icons/undo.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/undo.ts#L1) diff --git a/docs/docs/api/modules/icons_upload.md b/docs/docs/api/modules/icons_upload.md index 4705772..e54755a 100644 --- a/docs/docs/api/modules/icons_upload.md +++ b/docs/docs/api/modules/icons_upload.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / icons/upload + # Module: icons/upload ## Table of contents @@ -14,4 +16,4 @@ #### Defined in -[src/icons/upload.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/icons/upload.ts#L1) +[src/icons/upload.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/icons/upload.ts#L1) diff --git a/docs/docs/api/modules/tools_Toolbar.md b/docs/docs/api/modules/tools_Toolbar.md deleted file mode 100644 index a919d9e..0000000 --- a/docs/docs/api/modules/tools_Toolbar.md +++ /dev/null @@ -1 +0,0 @@ -# Module: tools/Toolbar diff --git a/docs/docs/api/modules/tools_Undo.md b/docs/docs/api/modules/tools_Undo.md deleted file mode 100644 index 1cc1cb4..0000000 --- a/docs/docs/api/modules/tools_Undo.md +++ /dev/null @@ -1 +0,0 @@ -# Module: tools/Undo diff --git a/docs/docs/api/modules/types_drawer.md b/docs/docs/api/modules/types_drawer.md index 2b750bd..2e66daa 100644 --- a/docs/docs/api/modules/types_drawer.md +++ b/docs/docs/api/modules/types_drawer.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / types/drawer + # Module: types/drawer ## Table of contents @@ -45,4 +47,4 @@ #### Defined in -[src/types/drawer.d.ts:24](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/drawer.d.ts#L24) +[src/types/drawer.d.ts:24](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/drawer.d.ts#L24) diff --git a/docs/docs/api/modules/types_modal.md b/docs/docs/api/modules/types_modal.md index 47d060a..f454970 100644 --- a/docs/docs/api/modules/types_modal.md +++ b/docs/docs/api/modules/types_modal.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / types/modal + # Module: types/modal ## Table of contents diff --git a/docs/docs/api/modules/types_toolbar.md b/docs/docs/api/modules/types_toolbar.md index 0134379..78cad00 100644 --- a/docs/docs/api/modules/types_toolbar.md +++ b/docs/docs/api/modules/types_toolbar.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / types/toolbar + # Module: types/toolbar ## Table of contents diff --git a/docs/docs/api/modules/types_utils.md b/docs/docs/api/modules/types_utils.md index 7adeb05..b5c4d2d 100644 --- a/docs/docs/api/modules/types_utils.md +++ b/docs/docs/api/modules/types_utils.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / types/utils + # Module: types/utils ## Table of contents @@ -34,4 +36,4 @@ #### Defined in -[src/types/utils.d.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/types/utils.d.ts#L1) +[src/types/utils.d.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/types/utils.d.ts#L1) diff --git a/docs/docs/api/modules/ui_Menu.md b/docs/docs/api/modules/ui_Menu.md index e6dd218..8b1f54c 100644 --- a/docs/docs/api/modules/ui_Menu.md +++ b/docs/docs/api/modules/ui_Menu.md @@ -1 +1,3 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / ui/Menu + # Module: ui/Menu diff --git a/docs/docs/api/modules/ui_Modal.md b/docs/docs/api/modules/ui_Modal.md index fd91879..6c63ea9 100644 --- a/docs/docs/api/modules/ui_Modal.md +++ b/docs/docs/api/modules/ui_Modal.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / ui/Modal + # Module: ui/Modal ## Table of contents diff --git a/docs/docs/api/modules/ui_SettingsModal.md b/docs/docs/api/modules/ui_SettingsModal.md index 8c12f7c..9259d34 100644 --- a/docs/docs/api/modules/ui_SettingsModal.md +++ b/docs/docs/api/modules/ui_SettingsModal.md @@ -1 +1,3 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / ui/SettingsModal + # Module: ui/SettingsModal diff --git a/docs/docs/api/modules/ui_Toolbar.md b/docs/docs/api/modules/ui_Toolbar.md index 21e080d..e6b8753 100644 --- a/docs/docs/api/modules/ui_Toolbar.md +++ b/docs/docs/api/modules/ui_Toolbar.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / ui/Toolbar + # Module: ui/Toolbar ## Table of contents diff --git a/docs/docs/api/modules/utils_DrawError.md b/docs/docs/api/modules/utils_DrawError.md index 14650b4..3221e76 100644 --- a/docs/docs/api/modules/utils_DrawError.md +++ b/docs/docs/api/modules/utils_DrawError.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / utils/DrawError + # Module: utils/DrawError ## Table of contents diff --git a/docs/docs/api/modules/utils_DrawEvent.md b/docs/docs/api/modules/utils_DrawEvent.md index 55c91e1..c8650f6 100644 --- a/docs/docs/api/modules/utils_DrawEvent.md +++ b/docs/docs/api/modules/utils_DrawEvent.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / utils/DrawEvent + # Module: utils/DrawEvent ## Table of contents @@ -25,4 +27,4 @@ #### Defined in -[src/utils/DrawEvent.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/DrawEvent.ts#L1) +[src/utils/DrawEvent.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/DrawEvent.ts#L1) diff --git a/docs/docs/api/modules/utils_History.md b/docs/docs/api/modules/utils_History.md index 2573c31..4d6def8 100644 --- a/docs/docs/api/modules/utils_History.md +++ b/docs/docs/api/modules/utils_History.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / utils/History + # Module: utils/History ## Table of contents diff --git a/docs/docs/api/modules/utils_constantes.md b/docs/docs/api/modules/utils_constantes.md index 4b47a1a..ef1dccc 100644 --- a/docs/docs/api/modules/utils_constantes.md +++ b/docs/docs/api/modules/utils_constantes.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / utils/constantes + # Module: utils/constantes ## Table of contents @@ -16,7 +18,7 @@ #### Defined in -[src/utils/constantes.ts:5](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/constantes.ts#L5) +[src/utils/constantes.ts:5](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/constantes.ts#L5) ___ @@ -26,14 +28,14 @@ ___ #### Defined in -[src/utils/constantes.ts:28](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/constantes.ts#L28) +[src/utils/constantes.ts:28](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/constantes.ts#L28) ___ ### defaultOptionsToolbar -• `Const` **defaultOptionsToolbar**: [`ToolbarOptions`](../interfaces/types_toolbar.ToolbarOptions.md) = `{}` +• `Const` **defaultOptionsToolbar**: [`ToolbarOptions`](../interfaces/types_toolbar.ToolbarOptions.md) #### Defined in -[src/utils/constantes.ts:37](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/constantes.ts#L37) +[src/utils/constantes.ts:37](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/constantes.ts#L37) diff --git a/docs/docs/api/modules/utils_dom.md b/docs/docs/api/modules/utils_dom.md index 263fd49..3c6a984 100644 --- a/docs/docs/api/modules/utils_dom.md +++ b/docs/docs/api/modules/utils_dom.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / utils/dom + # Module: utils/dom ## Table of contents @@ -19,7 +21,7 @@ #### Defined in -[src/utils/dom.ts:5](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/dom.ts#L5) +[src/utils/dom.ts:5](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/dom.ts#L5) ___ @@ -45,4 +47,4 @@ ___ #### Defined in -[src/utils/dom.ts:1](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/dom.ts#L1) +[src/utils/dom.ts:1](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/dom.ts#L1) diff --git a/docs/docs/api/modules/utils_infos.md b/docs/docs/api/modules/utils_infos.md index 24c2b60..6a1e96a 100644 --- a/docs/docs/api/modules/utils_infos.md +++ b/docs/docs/api/modules/utils_infos.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / utils/infos + # Module: utils/infos ## Table of contents @@ -33,7 +35,7 @@ returns the xy point where the mouse event was occured inside an element. #### Defined in -[src/utils/infos.ts:13](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/infos.ts#L13) +[src/utils/infos.ts:13](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/infos.ts#L13) ___ @@ -49,4 +51,4 @@ Check if is tactil #### Defined in -[src/utils/infos.ts:4](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/infos.ts#L4) +[src/utils/infos.ts:4](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/infos.ts#L4) diff --git a/docs/docs/api/modules/utils_perf.md b/docs/docs/api/modules/utils_perf.md index 9e17e55..af3791e 100644 --- a/docs/docs/api/modules/utils_perf.md +++ b/docs/docs/api/modules/utils_perf.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / utils/perf + # Module: utils/perf ## Table of contents @@ -62,7 +64,7 @@ window.addEventListener("resize", debouncedUpdateLayout); #### Defined in -[src/utils/perf.ts:22](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/perf.ts#L22) +[src/utils/perf.ts:22](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/perf.ts#L22) ___ @@ -91,7 +93,7 @@ Measure time executing function #### Defined in -[src/utils/perf.ts:81](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/perf.ts#L81) +[src/utils/perf.ts:81](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/perf.ts#L81) ___ @@ -137,4 +139,4 @@ window.addEventListener("scroll", throttledUpdateLayout); #### Defined in -[src/utils/perf.ts:58](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/perf.ts#L58) +[src/utils/perf.ts:58](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/perf.ts#L58) diff --git a/docs/docs/api/modules/utils_utils.md b/docs/docs/api/modules/utils_utils.md index bd928af..c89f4ce 100644 --- a/docs/docs/api/modules/utils_utils.md +++ b/docs/docs/api/modules/utils_utils.md @@ -1,3 +1,5 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / utils/utils + # Module: utils/utils ## Table of contents @@ -29,7 +31,7 @@ #### Defined in -[src/utils/utils.ts:61](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/utils.ts#L61) +[src/utils/utils.ts:61](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/utils.ts#L61) ___ @@ -49,7 +51,7 @@ ___ #### Defined in -[src/utils/utils.ts:71](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/utils.ts#L71) +[src/utils/utils.ts:71](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/utils.ts#L71) ___ @@ -76,7 +78,7 @@ ___ #### Defined in -[src/utils/utils.ts:42](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/utils.ts#L42) +[src/utils/utils.ts:42](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/utils.ts#L42) ___ @@ -99,7 +101,7 @@ Convert hex to rgba #### Defined in -[src/utils/utils.ts:7](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/utils.ts#L7) +[src/utils/utils.ts:7](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/utils.ts#L7) ___ @@ -130,7 +132,7 @@ is an object #### Defined in -[src/utils/utils.ts:26](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/utils.ts#L26) +[src/utils/utils.ts:26](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/utils.ts#L26) ___ @@ -150,4 +152,4 @@ ___ #### Defined in -[src/utils/utils.ts:38](https://github.com/fabwcie/drawer/blob/6f6bdfc/src/utils/utils.ts#L38) +[src/utils/utils.ts:38](https://github.com/fabwcie/drawer/blob/850d9ed/src/utils/utils.ts#L38) diff --git a/docs/docs/api/modules/vite_env.md b/docs/docs/api/modules/vite_env.md index a98b40a..de9585d 100644 --- a/docs/docs/api/modules/vite_env.md +++ b/docs/docs/api/modules/vite_env.md @@ -1 +1,3 @@ +[@fabwcie/drawer](../README.md) / [Exports](../modules.md) / vite-env + # Module: vite-env diff --git a/docs/src/pages/index.module.css b/docs/src/pages/index.module.css index 9f71a5d..9dfaa52 100644 --- a/docs/src/pages/index.module.css +++ b/docs/src/pages/index.module.css @@ -8,6 +8,7 @@ text-align: center; position: relative; overflow: hidden; + background: url("@site/static/img/illustration_blank_canvas.svg") no-repeat #646cff; } @media screen and (max-width: 996px) { diff --git a/docs/static/img/illustration_blank_canvas.svg b/docs/static/img/illustration_blank_canvas.svg new file mode 100644 index 0000000..c104c29 --- /dev/null +++ b/docs/static/img/illustration_blank_canvas.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 4f2a20e..4414636 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "format": "prettier src/**/*.ts --write", "lint": "npx eslint src/**", "prebuild": "npm test && npm run lint", - "build:docs": "npx typedoc --excludePrivate --plugin typedoc-plugin-markdown --hideBreadcrumbs --out docs/docs/api src/**/*.ts", + "build:docs": "npx typedoc --excludePrivate --plugin typedoc-plugin-markdown --out docs/docs/api src/**/*.ts", "prepare": "husky install", "release": "standard-version", "release:patch": "standard-version --release-as patch && git push --follow-tags origin master && npm publish --access public",