Updated doc

This commit is contained in:
Luis Leiva 2017-12-11 23:04:50 +01:00
parent 8bb7360f2b
commit 06d19333cd
6 changed files with 19 additions and 19 deletions

View File

@ -61,6 +61,7 @@
/**
* Cancel current animation.
* @return {AnimateSketch}.
*/
this.cancel = function() {
cancelAnimationFrame(raf);
@ -107,7 +108,7 @@
/**
* Animate plugin constructor for jQuery Sketchable instances.
* @param {jQuery} $instance - jQuery Sketchable instance.
* @memberof $.fn.sketchable.plugins
* @namespace $.fn.sketchable.plugins.animate
*/
$.fn.sketchable.plugins.animate = function($instance) {
// Access the instance configuration.
@ -156,7 +157,7 @@
/**
* Animate canvas strokes.
* @return {jQuery} jQuery sketchable element.
* @memberof $.fn.sketchable
* @memberof $.fn.sketchable.plugins.animate
* @example jqueryElem.sketchable('strokes', strokesArray).sketchable('animate.strokes');
* @example
* // Accessing event hooks:

View File

@ -244,7 +244,7 @@
* Note: This is equivalent to accessing `Sketchable.prototype` in the non-jQuery version.
* @namespace $.fn.sketchable.api
* @type {object}
* @see Sketchable.prototype
* @see Sketchable
*/
$.fn.sketchable.api = api;

View File

@ -165,7 +165,7 @@
/**
* Memento plugin constructor for jQuery Sketchable instances.
* @param {jQuery} $instance - jQuery sketchable instance.
* @memberof $.fn.sketchable.plugins
* @namespace $.fn.sketchable.plugins.memento
*/
$.fn.sketchable.plugins.memento = function($instance) {
// Access the instance configuration.
@ -217,7 +217,7 @@
/**
* Goes back to the previous CANVAS state, if available.
* @return {jQuery} jQuery sketchable element.
* @memberof $.fn.sketchable
* @memberof $.fn.sketchable.plugins.memento
* @example jqueryElem.sketchable('memento.undo');
*/
undo: function() {
@ -228,7 +228,7 @@
/**
* Goes forward to the previous CANVAS state, if available.
* @return {jQuery} jQuery sketchable element.
* @memberof $.fn.sketchable
* @memberof $.fn.sketchable.plugins.memento
* @example jqueryElem.sketchable('memento.redo');
*/
redo: function() {
@ -239,7 +239,7 @@
/**
* Save a snapshot of the current CANVAS.
* @return {jQuery} jQuery sketchable element.
* @memberof $.fn.sketchable
* @memberof $.fn.sketchable.plugins.memento
* @example jqueryElem.sketchable('memento.save');
*/
save: function() {
@ -250,7 +250,7 @@
/**
* Read current CANVAS state: `{ image:String, strokes:Array }`.
* @return {object}
* @memberof $.fn.sketchable
* @memberof $.fn.sketchable.plugins.memento
* @example var state = jqueryElem.sketchable('memento.state');
*/
state: function() {
@ -263,7 +263,7 @@
* @param {string} state.image - Base64 image.
* @param {array} state.strokes - Associated strokes.
* @return {jQuery} jQuery sketchable element.
* @memberof $.fn.sketchable
* @memberof $.fn.sketchable.plugins.memento
* @example jqueryElem.sketchable('memento.restore', state);
*/
restore: function(state) {

View File

@ -44,8 +44,6 @@
/**
* jSketch methods (publicly extensible).
* @ignore
* @memberof jSketch
* @see jSketch
*/
jSketch.prototype = {
/**

View File

@ -63,6 +63,7 @@
/**
* Cancel current animation.
* @return {AnimateSketch}.
*/
this.cancel = function() {
cancelAnimationFrame(raf);
@ -109,7 +110,7 @@
/**
* Animate plugin constructor for jQuery Sketchable instances.
* @param {Sketchable} instance - Sketchable element.
* @memberof Sketchable#plugins
* @namespace Sketchable.plugins.animate
*/
Sketchable.prototype.plugins.animate = function(instance) {
// Access the instance configuration.
@ -158,7 +159,7 @@
/**
* Animate canvas strokes.
* @return {Sketchable} instance Sketchable element.
* @memberof Sketchable
* @memberof Sketchable.plugins.animate
* @example sketchableInstance.strokes(strokeArray).animate.strokes();
* @example
* // Accessing event hooks:

View File

@ -167,7 +167,7 @@
/**
* Memento plugin constructor for Sketchable instances.
* @param {Sketchable} instance - Sketchable element.
* @memberof Sketchable#plugins
* @namespace Sketchable.plugins.memento
*/
Sketchable.prototype.plugins.memento = function(instance) {
// Access the instance configuration.
@ -219,7 +219,7 @@
/**
* Goes back to the previous CANVAS state, if available.
* @return {Sketchable} Sketchable instance.
* @memberof Sketchable
* @memberof Sketchable.plugins.memento
* @example sketchableInstance.memento.undo();
*/
undo: function() {
@ -230,7 +230,7 @@
/**
* Goes forward to the previous CANVAS state, if available.
* @return {Sketchable} Sketchable instance.
* @memberof Sketchable
* @memberof Sketchable.plugins.memento
* @example sketchableInstance.memento.redo();
*/
redo: function() {
@ -241,7 +241,7 @@
/**
* Save a snapshot of the current CANVAS.
* @return {Sketchable} Sketchable instance.
* @memberof Sketchable
* @memberof Sketchable.plugins.memento
* @example sketchableInstance.memento.save();
*/
save: function() {
@ -252,7 +252,7 @@
/**
* Read current CANVAS state: `{ image:String, strokes:Array }`.
* @return {object}
* @memberof Sketchable
* @memberof Sketchable.plugins.memento
* @example var state = sketchableInstance.memento.state();
*/
state: function() {
@ -265,7 +265,7 @@
* @param {string} state.image - Base64 image.
* @param {array} state.strokes - Associated strokes.
* @return {Sketchable} Sketchable instance.
* @memberof Sketchable
* @memberof Sketchable.plugins.memento
* @example
* var someState = sketchableInstance.memento.state();
* sketchableInstance.memento.restore(someState);