},
{
tag: "line",
+ id: this.svgID + "-svg-l",
x1: "0", // start
y1: (this.height*0.8), // start set the line in 80% of height
x2: this.width, // end
pt.x = e.clientX;
pt.y = e.clientY;
if (this.isTouchEvent(e)) {
- pt.x = e.targetTouches[0].clientX
+ pt.x = e.targetTouches[0].clientX;
pt.y = e.targetTouches[0].clientY;
}
var a = this.svgEl.dom.getScreenCTM();
*
* @return {String} Image Data URI
*/
- getImageDataURI : function(w, h){
- var newSvgEl = {};
- Roo.apply(newSvgEl, this.svgEl);
-
- newSvgEl.attr('viewBox', '0 0 '+w+' '+h);
- newSvgEl.attr('height', h);
- newSvgEl.attr('width', w);
-
- var svg = this.svgEl.dom.outerHTML;
+ getImageDataURI : function(){
+ var svg = this.svgEl.dom.parentNode.innerHTML;
var src = 'data:image/svg+xml;base64,'+window.btoa(svg);
- return src;
+ return src;
},
/**
*
if(!this.getSignature()){
return;
}
+
this.signPanel.select('#'+ this.svgID + '-svg-r', true).first().attr('fill', '#cfc');
this.setValue(this.getSignature());
this.isConfirmed = true;
- Roo.log('in confirm clicked');
-//
-// var valid = true;
-// this.items.each(function(f){
-// if(!f.isValid(true)){
-// valid = false;
-// return false;
-// }
-// });
-// for(var i = 0, len = this.buttons.length; i < len; i++){
-// var btn = this.buttons[i];
-// if(btn.formBind === true && btn.disabled === valid){
-// btn.setDisabled(!valid);
-// }
-// }
this.fireEvent('confirm', this);
},
// private