X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-bootstrap-debug.js;h=bcb5ad72e320781f9e4dcf5e0feca27335851de9;hb=f4275764a85f25bb0f07a37b8141bd8b1d1f6923;hp=8495ec6d4a61288aaaf0a0c53a00438281cb180a;hpb=7c297c4be5c3a4bfb6bce8729094a3f06b12eb6f;p=roojs1 diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 8495ec6d4a..bcb5ad72e3 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -24085,6 +24085,7 @@ Roo.namespace('Roo.bootstrap.htmleditor'); * @class Roo.bootstrap.HtmlEditorToolbar1 * Basic Toolbar * + * @example * Usage: * new Roo.bootstrap.HtmlEditor({ @@ -27211,17 +27212,15 @@ Roo.apply(Roo.bootstrap.LocationPicker, { } -});/* - * - LGPL - * - * Alert - * - */ - -/** +});/** * @class Roo.bootstrap.Alert * @extends Roo.bootstrap.Component - * Bootstrap Alert class + * Bootstrap Alert class - shows an alert area box + * eg + * + * @licence LGPL * @cfg {String} title The title of alert * @cfg {String} html The content of alert * @cfg {String} weight ( success | info | warning | danger ) @@ -41544,17 +41543,14 @@ Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, { } });/** -* This script refer to: -* Title: Signature Pad -* Author: szimek -* Availability: https://github.com/szimek/signature_pad -**/ - -/** * @class Roo.bootstrap.BezierSignature * @extends Roo.bootstrap.Component * Bootstrap BezierSignature class - * + * This script refer to: + * Title: Signature Pad + * Author: szimek + * Availability: https://github.com/szimek/signature_pad + * * @constructor * Create a new BezierSignature * @param {Object} config The config object @@ -41567,8 +41563,9 @@ Roo.bootstrap.BezierSignature = function(config){ }); }; -Roo.extend(Roo.bootstrap.BezierSignature, Roo.bootstrap.Component, { - +Roo.extend(Roo.bootstrap.BezierSignature, Roo.bootstrap.Component, +{ + curve_data: [], is_empty: true, @@ -41576,57 +41573,57 @@ Roo.extend(Roo.bootstrap.BezierSignature, Roo.bootstrap.Component, { mouse_btn_down: true, /** - * @cfg(int) canvas height + * @cfg {int} canvas height */ canvas_height: '200px', /** - * @cfg(float or function) Radius of a single dot. + * @cfg {float|function} Radius of a single dot. */ dot_size: false, /** - * @cfg(float) Minimum width of a line. Defaults to 0.5. + * @cfg {float} Minimum width of a line. Defaults to 0.5. */ min_width: 0.5, /** - * @cfg(float) Maximum width of a line. Defaults to 2.5. + * @cfg {float} Maximum width of a line. Defaults to 2.5. */ max_width: 2.5, /** - * @cfg(integer) Draw the next point at most once per every x milliseconds. Set it to 0 to turn off throttling. Defaults to 16. + * @cfg {integer} Draw the next point at most once per every x milliseconds. Set it to 0 to turn off throttling. Defaults to 16. */ throttle: 16, /** - * @cfg(integer) Add the next point only if the previous one is farther than x pixels. Defaults to 5. + * @cfg {integer} Add the next point only if the previous one is farther than x pixels. Defaults to 5. */ min_distance: 5, /** - * @cfg(string) Color used to clear the background. Can be any color format accepted by context.fillStyle. Defaults to "rgba(0,0,0,0)" (transparent black). Use a non-transparent color e.g. "rgb(255,255,255)" (opaque white) if you'd like to save signatures as JPEG images. + * @cfg {string} Color used to clear the background. Can be any color format accepted by context.fillStyle. Defaults to "rgba(0,0,0,0)" (transparent black). Use a non-transparent color e.g. "rgb(255,255,255)" (opaque white) if you'd like to save signatures as JPEG images. */ bg_color: 'rgba(0, 0, 0, 0)', /** - * @cfg(string) Color used to draw the lines. Can be any color format accepted by context.fillStyle. Defaults to "black". + * @cfg {string} Color used to draw the lines. Can be any color format accepted by context.fillStyle. Defaults to "black". */ dot_color: 'black', /** - * @cfg(float) Weight used to modify new velocity based on the previous velocity. Defaults to 0.7. - */ + * @cfg {float} Weight used to modify new velocity based on the previous velocity. Defaults to 0.7. + */ velocity_filter_weight: 0.7, /** - * @cfg(function) Callback when stroke begin. + * @cfg {function} Callback when stroke begin. */ onBegin: false, /** - * @cfg(function) Callback when stroke end. + * @cfg {function} Callback when stroke end. */ onEnd: false, @@ -41719,8 +41716,11 @@ Roo.extend(Roo.bootstrap.BezierSignature, Roo.bootstrap.Component, { var canvas = this.canvasEl().dom; var ctx = this.canvasElCtx(); - var img_data = ctx.getImageData(0, 0, canvas.width, canvas.height); + var img_data = false; + if(canvas.width > 0) { + var img_data = ctx.getImageData(0, 0, canvas.width, canvas.height); + } // setting canvas width will clean img data canvas.width = 0; @@ -41732,7 +41732,9 @@ Roo.extend(Roo.bootstrap.BezierSignature, Roo.bootstrap.Component, { canvas.width = this.el.dom.clientWidth - padding_left - padding_right; - ctx.putImageData(img_data, 0, 0); + if(img_data) { + ctx.putImageData(img_data, 0, 0); + } }, _handleMouseDown: function(e) @@ -41798,7 +41800,7 @@ Roo.extend(Roo.bootstrap.BezierSignature, Roo.bootstrap.Component, { this.strokeUpdate(e); if (this.throttle) { - this.throttle(this.strokeUpdate, this.throttle); + this.throttleStroke(this.strokeUpdate, this.throttle); } else { this.strokeUpdate(e); @@ -42089,7 +42091,7 @@ Roo.extend(Roo.bootstrap.BezierSignature, Roo.bootstrap.Component, { return Bezier; }()), - throttle: function(fn, wait) { + throttleStroke: function(fn, wait) { if (wait === void 0) { wait = 250; } var previous = 0; var timeout = null;