[]
type PaintToolsPluginOptions = object;
Options for the PaintToolsPlugin.
optional buttonPosition: number | false;
The position where the "Paint tools", "Text and Objects" and "Effects" buttons should be inserted in the main toolbar.
Use false
or -1
to skip insertion.
Undefined means the position will be determined automatically.
optional fontNames: string[];
Array of available font names.
['Arial', 'Verdana', 'Helvetica', 'Tahoma', 'Trebuchet MS', 'Times New Roman', 'Georgia', 'Garamond', 'Courier New', 'Brush Script MT']
optional toolbarLayout: object;
Optional. Specifies the layout of the paint, effects and objects toolbar. Defaults:
effectsTools: ToolbarItemType[] | boolean;
Array of items for the effects tools toolbar.
Set to false
if you want to hide this toolbar item.
["Apply", "Cancel", "Splitter", "Selection", "Splitter", "BrightnessContrast", "Vibrance", "Blur", "Pixelate", "Splitter", "Eraser", "Size", "UseOriginalImage", "Splitter", "Undo", "Redo"]
objectTools: ToolbarItemType[] | boolean;
Array of items for the insert objects toolbar.
Set to false
if you want to hide this toolbar item.
paintTools: ToolbarItemType[] | boolean;
Array of items for the paint tools toolbar.
Set to false
if you want to hide this toolbar item.
["Apply", "Cancel", "Splitter", "Selection", "Pencil", "Brush", "CloneStamp", "Eraser", "Splitter", "Size", "Color", "UseOriginalImage", "Splitter", "Undo", "Redo"]
textTools: ToolbarItemType[] | boolean;
Array of items for the text tools toolbar.
["Apply", "Cancel" , "Splitter", "Text", "Splitter", "FontSize", "FontName", "FontBold", "FontItalic", "FontColor", "Splitter", "Undo", "Redo"]
This option is deprecated in favor of the "Text and Objects" toolbar where you can add text objects directly.
// Modify paint tools toolbar
viewer.addPlugin(new PaintToolsPlugin({
toolbarLayout: {
paintTools: ["Pencil", "Size", "Color", "Splitter", "Apply", "Cancel"]
}
}));
// Modify object tools toolbar
viewer.addPlugin(new PaintToolsPlugin({
toolbarLayout: {
objectTools: ["Apply", "Cancel", "Rectangle", "Arrow"]
}
}));
// Modify effects tools toolbar
viewer.addPlugin(new PaintToolsPlugin({
toolbarLayout: {
effectsTools: ["Apply", "Cancel", "Splitter", "Brightness", "Pixelate" ]
}
}));