-
assetsall resources used by a project. Fonts/images/cursors etc.
-
examplesQuick setup quides, how-tos and other examples.
-
apiExample of working with DrawerJS through it's programming interface
-
assetsResources for example pages. Images/fonts etc.
-
custom-storage-functionsExample which shows a way to override DrawerJS' functions for storage and retrieving canvas data. Can be useful when embedding DrawerJS into mobile app, to provide device's native storage.
-
redactorExample shows DrawerJS usage as a plugin in Redactor editor
-
standaloneExample shows simplest way of using DrawerJS in a html page.
-
toolbar-positionExample shows configuration options for toolbar positions.
-
-
liblibraries used by DrawerJS. We prefer storing libraries in files instead of package managers because in such was we can always be sure we have a stable and tested version.
-
srcSource code directory.
-
fabricjs_extensionsCustom objects that extend fabricjs objects. If one needs a shape which is not included in fabricjs (like Arrow), this is a place for it.
-
pluginsAll DrawerJS plugins. [More on plugins system]
-
toolbarsToolbars management code became so huge so it was extracted to separate folder. Here one will find classes for toolbars as well as toolbar managers.
-
We have a file [Globals.js] which defines DrawerJS namespace as well as some child namespaces like DrawerJS.plugins.
We use Self-Invoking functions to scope file's namespace.
Any file should follow this pattern:
(function($, drawer) { // receive passed globals
// module code
}(jQuery, DrawerJS)); // pass objects from window global namespaceAll files are concantenated into one with Grunt.