提交 97b9c706 编写于 作者: U unknown

手写板

上级 fdc878a2
......@@ -87,5 +87,64 @@
"canvasWrap": {
"border": "1px solid #ccc",
"margin": "0px auto"
},
"cancel_mobile": {
"color": "#333",
"font-size": "16px",
"width": "36px",
"height": "36px",
"font-weight": "bold",
"position": "absolute",
"top": "20px",
"left": "30px"
},
"save_mobile": {
"color": "#4A90E2",
"font-size": "16px",
"width": "36px",
"height": "36px",
"font-weight": "bold",
"position": "absolute",
"top": "20px",
"right": "30px"
},
"undo_mobile": {
"background":"#fff url(../o2_core/o2/widget/$Tablet/default/icon/undo_normal.png) no-repeat center center",
"width": "36px",
"height": "36px",
"border-radius": "18px",
"box-shadow": "5px 4px 5px #ccc",
"position": "absolute",
"bottom": "20px",
"right": "130px"
},
"undo_mobile_disable": {
"background":"#fff url(../o2_core/o2/widget/$Tablet/default/icon/undo_disable.png) no-repeat center center"
},
"redo_mobile": {
"background":"#fff url(../o2_core/o2/widget/$Tablet/default/icon/redo_normal.png) no-repeat center center",
"width": "36px",
"height": "36px",
"border-radius": "18px",
"box-shadow": "5px 4px 5px #ccc",
"position": "absolute",
"bottom": "20px",
"right": "80px"
},
"redo_mobile_disable": {
"background":"#fff url(../o2_core/o2/widget/$Tablet/default/icon/redo_disable.png) no-repeat center center"
},
"reset_mobile": {
"background":"#fff url(../o2_core/o2/widget/$Tablet/default/icon/reset_normal.png) no-repeat center center",
"width": "36px",
"height": "36px",
"border-radius": "18px",
"box-shadow": "5px 4px 5px #ccc",
"position": "absolute",
"bottom": "20px",
"right": "30px"
},
"reset_mobile_disable": {
"background":"#fff url(../o2_core/o2/widget/$Tablet/default/icon/reset_disable.png) no-repeat center center"
}
}
\ No newline at end of file
......@@ -26,7 +26,9 @@ o2.widget.Tablet = o2.Tablet = new Class({
//"clear" //橡皮
"cancel"
],
"toolHidden": [],
"description" : "", //描述文字
"imageSrc": "",
"action" : null, //uploadImage方法的上传服务,可选,如果不设置,使用公共图片服务
......@@ -36,7 +38,9 @@ o2.widget.Tablet = o2.Tablet = new Class({
"data": null, //formdata 的data
"reference": "", //uploadImage方法的使用 使用公共图片服务上传时的参数
"referenceType" : "", //使用公共图片服务上传时的参数, 目前支持 processPlatformJob, processPlatformForm, portalPage, cmsDocument, forumDocument
"resultMaxSize" : 0 //使用 reference 时有效
"resultMaxSize" : 0, //使用 reference 时有效
"rotateWithMobile": true
},
initialize: function(node, options, app){
this.node = node;
......@@ -65,6 +69,9 @@ o2.widget.Tablet = o2.Tablet = new Class({
this.fireEvent("init");
},
load: function( ){
if( layout.mobile && this.options.rotateWithMobile ){
this.rotate = true;
}
//存储当前表面状态数组-上一步
this.preDrawAry = [];
//存储当前表面状态数组-下一步
......@@ -76,6 +83,10 @@ o2.widget.Tablet = o2.Tablet = new Class({
styles : this.css.container
}).inject(this.node);
if( this.rotate ){ //强制横屏显示
this.detectOrient();
}
this.loadToolBar();
this.contentNode = new Element("div.contentNode", { styles : this.css.contentNode}).inject(this.container);
......@@ -113,36 +124,9 @@ o2.widget.Tablet = o2.Tablet = new Class({
}
},
setContentSize : function(){
var nodeSize = this.node.getSize();
this.contentWidth = this.options.contentWidth || nodeSize.x;
if( this.contentWidth < 100 )this.contentWidth = 100;
debugger;
this.computeContentSize();
this.contentNode.setStyle("width", this.contentWidth );
if( this.options.contentHeight ){
this.contentHeight = this.options.contentHeight;
}else{
var toolbarSize = this.toolbarNode ? this.toolbarNode.getSize() : { x : 0, y : 0 };
var descriptionSize = this.descriptionNode ? this.descriptionNode.getSize() : { x : 0, y : 0 };
var toolbarMargin = this.toolbarNode ? this.toolbarNode.getStyles("margin-top", "margin-bottom", "padding-top", "padding-bottom", "bordrt-top-width", "bordrt-bottom-width") : null;
var m1 = (toolbarMargin) ? toolbarMargin["margin-top"].toInt()+toolbarMargin["margin-bottom"].toInt()+
toolbarMargin["padding-bottom"].toInt()+toolbarMargin["padding-top"].toInt()+
(toolbarMargin["bordrt-top-width"].toInt() || 0)+(toolbarMargin["bordrt-bottom-width"].toInt() || 0) : 0;
var descriptionMargin = this.descriptionNode ? this.descriptionNode.getStyles("margin-top", "margin-bottom", "padding-top", "padding-bottom", "bordrt-top-width", "bordrt-bottom-width") : null;
var m2 = (descriptionMargin) ? descriptionMargin["margin-top"].toInt()+descriptionMargin["margin-bottom"].toInt()+
descriptionMargin["padding-bottom"].toInt()+descriptionMargin["padding-top"].toInt()+
(descriptionMargin["bordrt-top-width"].toInt() || 0)+(descriptionMargin["bordrt-bottom-width"].toInt() || 0) : 0;
var contentMargin = this.contentNode.getStyles("margin-top", "margin-bottom", "padding-top", "padding-bottom", "bordrt-top-width", "bordrt-bottom-width");
var m3 = contentMargin["margin-top"].toInt()+contentMargin["margin-bottom"].toInt()+
contentMargin["padding-bottom"].toInt()+contentMargin["padding-top"].toInt()+
(contentMargin["bordrt-top-width"].toInt() || 0)+(contentMargin["bordrt-bottom-width"].toInt() || 0);
this.contentHeight = nodeSize.y - toolbarSize.y - descriptionSize.y - m1 - m2 - m3;
}
if( this.contentHeight < 150 )this.contentHeight = 150;
this.contentNode.setStyle("height", this.contentHeight );
if(this.canvasWrap){
......@@ -159,13 +143,72 @@ o2.widget.Tablet = o2.Tablet = new Class({
this.ctx.putImageData(d,0,0);
}
},
computeContentSize: function(){
var toolbarSize,descriptionSize, m1,m2,m3;
var nodeSize = this.node.getSize();
if( this.rotate && this.transform > 0 ){
this.contentWidth = this.options.contentHeight || nodeSize.y;
if( this.contentWidth < 150 )this.contentWidth = 150;
if( this.options.contentWidth ){
this.contentHeight = this.options.contentWidth;
}else{
toolbarSize = this.toolbarNode ? this.toolbarNode.getSize() : { x : 0, y : 0 };
descriptionSize = this.descriptionNode ? this.descriptionNode.getSize() : { x : 0, y : 0 };
m1 = this.getOffsetX(this.toolbarNode);
m2 = this.getOffsetX(this.descriptionNode);
m3 = this.getOffsetX(this.contentNode);
this.contentOffSetX = toolbarSize.x + descriptionSize.x + m1 + m2 + m3;
this.contentHeight = nodeSize.x - toolbarSize.x - descriptionSize.x - m1 - m2 - m3;
}
if( this.contentHeight < 100 )this.contentHeight = 100;
}else{
this.contentWidth = this.options.contentWidth || nodeSize.x;
if( this.contentWidth < 100 )this.contentWidth = 100;
if( this.options.contentHeight ){
this.contentHeight = this.options.contentHeight;
}else{
toolbarSize = this.toolbarNode ? this.toolbarNode.getSize() : { x : 0, y : 0 };
descriptionSize = this.descriptionNode ? this.descriptionNode.getSize() : { x : 0, y : 0 };
m1 = this.getOffsetY(this.toolbarNode);
m2 = this.getOffsetY(this.descriptionNode);
m3 = this.getOffsetY(this.contentNode);
this.contentHeight = nodeSize.y - toolbarSize.y - descriptionSize.y - m1 - m2 - m3;
}
if( this.contentHeight < 150 )this.contentHeight = 150;
}
},
getOffsetY : function(node){
if( !node )return 0;
return (node.getStyle("margin-top").toInt() || 0 ) +
(node.getStyle("margin-bottom").toInt() || 0 ) +
(node.getStyle("padding-top").toInt() || 0 ) +
(node.getStyle("padding-bottom").toInt() || 0 )+
(node.getStyle("border-top-width").toInt() || 0 ) +
(node.getStyle("border-bottom-width").toInt() || 0 );
},
getOffsetX : function(node){
if( !node )return 0;
return (node.getStyle("margin-left").toInt() || 0 ) +
(node.getStyle("margin-right").toInt() || 0 ) +
(node.getStyle("padding-left").toInt() || 0 ) +
(node.getStyle("padding-right").toInt() || 0 )+
(node.getStyle("border-left-width").toInt() || 0 ) +
(node.getStyle("border-right-width").toInt() || 0 );
},
loadToolBar: function(){
this.toolbarNode = new Element("div.toolbar", {
"styles" : this.css.toolbar
}).inject(this.container);
if(layout.mobile){
this.toolbar = new o2.widget.Tablet.ToolbarMobile( this );
this.toolbar.load();
}else{
this.toolbarNode = new Element("div.toolbar", {
"styles" : this.css.toolbar
}).inject(this.container);
this.toolbar = new o2.widget.Tablet.Toolbar( this , this.toolbarNode );
this.toolbar.load();
this.toolbar = new o2.widget.Tablet.Toolbar( this , this.toolbarNode );
this.toolbar.load();
}
},
storeToPreArray : function(){
//当前绘图表面状态
......@@ -193,6 +236,7 @@ o2.widget.Tablet = o2.Tablet = new Class({
}
},
loadContent : function( ){
var _self = this;
this.canvasWrap = new Element("div.canvasWrap", { styles : this.css.canvasWrap}).inject(this.contentNode);
this.canvasWrap.setStyles({
......@@ -207,10 +251,22 @@ o2.widget.Tablet = o2.Tablet = new Class({
this.ctx = this.canvas.getContext("2d");
var preData=this.ctx.getImageData(0,0,this.contentWidth,this.contentHeight);
//空绘图表面进栈
this.middleAry.push(preData);
if( this.options.imageSrc ){
var img = new Element("img", {
"crossOrigin": "",
"src": this.options.imageSrc,
"events": {
"load": function () {
_self.ctx.drawImage(this, 0, 0);
var preData=_self.ctx.getImageData(0,0,_self.contentWidth,_self.contentHeight);
_self.middleAry.push(preData);
}
}
})
}else{
var preData=this.ctx.getImageData(0,0,this.contentWidth,this.contentHeight);
this.middleAry.push(preData);
}
this.canvas.ontouchstart = this.canvas.onmousedown = function(ev){
var ev = ev || event;
......@@ -224,12 +280,33 @@ o2.widget.Tablet = o2.Tablet = new Class({
if( this.options.lineWidth )ctx.lineWidth= this.currentWidth || this.options.lineWidth; //默认1 像素
ctx.beginPath();
ctx.moveTo(ev.clientX-position.x,ev.clientY-position.y);
var x , y;
if(this.rotate && _self.transform > 0){
var clientY = ev.type.indexOf('touch') !== -1 ? ev.touches[0].clientY : ev.clientY;
var clientX = ev.type.indexOf('touch') !== -1 ? ev.touches[0].clientX : ev.clientX;
var newX = clientY;
var newY = _self.canvas.height - clientX; //y轴旋转偏移 // - parseInt(_self.transformOrigin)
}else{
x = ev.clientX-position.x;
y = ev.clientY-position.y
}
ctx.moveTo(x, y);
this.storeToPreArray();
var mousemove = function(ev){
ctx.lineTo(ev.client.x - position.x,ev.client.y - position.y);
debugger;
var mx , my;
if(_self.rotate && _self.transform > 0){
mx = ev.client.y;
my = _self.canvas.height - ev.client.x //y轴旋转偏移 // - + parseInt(_self.transformOrigin);
}else{
mx = ev.client.x - position.x;
my = ev.client.y - position.y;
}
ctx.lineTo(mx, my);
ctx.stroke();
};
doc.addEvent( "mousemove", mousemove );
......@@ -254,6 +331,40 @@ o2.widget.Tablet = o2.Tablet = new Class({
//}
}.bind(this)
},
detectOrient: function(){
// 利用 CSS3 旋转 对根容器逆时针旋转 90 度
var size = $(document.body).getSize();
var width = size.x,
height = size.y,
styles = {};
if( width >= height ){ // 横屏
this.transform = 0;
this.transformOrigin = 0;
styles = {
"width": width+"px",
"height": height+"px",
"webkit-transform": "rotate(0)",
"transform": "rotate(0)",
"webkit-transform-origin": "0 0",
"transform-origin": "0 0"
}
}
else{ // 竖屏
this.options.lineWidth = 1.5;
this.transform = 90;
this.transformOrigin = width / 2;
styles = {
"width": height+"px",
"height": width+"px",
"webkit-transform": "rotate(90deg)",
"transform": "rotate(90deg)",
"webkit-transform-origin": ( this.transformOrigin + "px " + this.transformOrigin + "px"),
"transform-origin": ( this.transformOrigin + "px " + this.transformOrigin + "px")
}
}
this.container.setStyles(styles);
},
uploadImage: function( success, failure ){
var image = this.getImage( null, true );
if( image ){
......@@ -578,6 +689,16 @@ o2.widget.Tablet.Toolbar = new Class({
];
}
items = items.filter(function(tool){
return !(this.tablet.options.toolHidden || []).contains(tool)
}.bind(this));
items = items.clean();
for( var i=1; i<items.length; i++ ){
if( items[i-1]==="|" && items[i]==="|")items[i-1] = null;
}
items = items.clean();
var html = "";
var style = "toolItem";
items.each( function( item ){
......@@ -666,24 +787,18 @@ o2.widget.Tablet.Toolbar = new Class({
disableItem : function( itemName ){
var itemNode = this.items[ itemName ]; //this.container.getElement("[item='+itemName+']");
itemNode.store("status", "disable");
this._setItemNodeDisable( itemNode );
this._setItemNodeDisable( itemNode, itemName );
},
enableItem : function( itemName ){
var itemNode = this.items[ itemName ];
itemNode.store("status", "enable");
this._setItemNodeNormal( itemNode );
this._setItemNodeNormal( itemNode, itemName );
},
_setItemNodeDisable : function( itemNode ){
var item = itemNode.get("item");
itemNode.setStyles( this.css.toolItem_disable );
itemNode.setStyle("background-image","url("+ this.imagePath+ item +"_disable.png)");
},
_setItemNodeActive: function( itemNode ){
if( itemNode.retrieve("status") == "disable" )return;
var item = itemNode.get("item");
itemNode.setStyles( this.css.toolItem_over );
itemNode.setStyle("background-image","url("+ this.imagePath+ item +"_active.png)");
},
_setItemNodeNormal: function( itemNode ){
if( itemNode.retrieve("status") == "disable" )return;
var item = itemNode.get("item");
......@@ -694,6 +809,52 @@ o2.widget.Tablet.Toolbar = new Class({
});
o2.widget.Tablet.ToolbarMobile = new Class({
Extends: o2.widget.Tablet.Toolbar,
Implements: [Options, Events],
load: function(){
this.tablet.container.setStyle("position","relative");
Array.each([{
"name": "cancel", "text": this.lp.cancel
},{
"name": "save", "text": this.lp.save
},{
"name": "undo"
},{
"name": "redo"
},{
"name": "reset"
}], function (item) {
this.items[item.name] = new Element("div",{
styles : this.css[item.name+"_mobile"],
events: {
click: function () {
debugger;
if( this.tablet[item.name] )this.tablet[item.name]( this.items[item.name] );
}.bind(this)
}
}).inject(this.tablet.container);
if(item.text)this.items[item.name].set("text", item.text)
}.bind(this))
this.setAllItemsStatus();
},
_setItemNodeDisable : function( itemNode, itemName ){
var item = itemNode.get("item");
itemNode.setStyles( this.css[itemName+"_mobile_disable"] );
},
_setItemNodeActive: function( itemNode, itemName ){
if( itemNode.retrieve("status") == "disable" )return;
var item = itemNode.get("item");
itemNode.setStyles( this.css[itemName+"_mobile_over"] );
},
_setItemNodeNormal: function( itemNode, itemName ){
if( itemNode.retrieve("status") == "disable" )return;
var item = itemNode.get("item");
itemNode.setStyles( this.css[itemName+"_mobile"] );
}
});
o2.xDesktop.requireApp("Template", "MTooltips", null, false);
o2.widget.Tablet.SizePicker = new Class({
Implements: [Options, Events],
......
......@@ -4606,6 +4606,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
*
* failure 参数:服务执行失败时的回调方法,形如 function(xhr){
* xhr XmlHttpRequest对象,服务器请求失败时有值
* return true; //从v6.3开始,返回true, 可以避免系统自动弹出错误信息;否则弹出错误信息。
* }
* 此参数可以省略,如果省略,系统会自动弹出错误信息。
*
......
......@@ -63,6 +63,7 @@ MWFForum.getSystemConfig = function( code ){
MWFForum.SystemSetting[code] = json.data;
}.bind(this), function(){
MWFForum.SystemSetting[code] = "";
return true;
}, false );
return MWFForum.SystemSetting[code];
......
......@@ -330,7 +330,7 @@ MWF.xApplication.Meeting.ListView.View.Line = new Class({
// }
// };
MWF.require("MWF.widget.O2Identity", function(){
var person = new MWF.widget.O2Person({"name": this.data.applicant}, this.personNode, {"style": "room"});
var person = new MWF.widget.O2Person({"displayName": this.data.applicant.split("@")[0], "name": this.data.applicant}, this.personNode, {"style": "room"});
}.bind(this));
}
......
......@@ -581,7 +581,7 @@
"cursor": "pointer",
"height": "25px",
"line-height": "25px",
"width": "30px",
"min-width": "30px",
"padding-left": "24px",
"padding-right": "5px",
"margin-left": "5px",
......
......@@ -535,7 +535,7 @@
"cursor": "pointer",
"height": "25px",
"line-height": "25px",
"width": "30px",
"min-width": "30px",
"padding-left": "24px",
"padding-right": "5px",
"margin-left": "5px",
......
......@@ -561,7 +561,7 @@
"cursor": "pointer",
"height": "25px",
"line-height": "25px",
"width": "30px",
"min-width": "30px",
"padding-left": "24px",
"padding-right": "5px",
"margin-left": "5px",
......
......@@ -506,7 +506,7 @@
"cursor": "pointer",
"height": "25px",
"line-height": "25px",
"width": "30px",
"min-width": "30px",
"padding-left": "24px",
"padding-right": "5px",
"margin-left": "5px",
......
......@@ -517,7 +517,7 @@
"cursor": "pointer",
"height": "25px",
"line-height": "25px",
"width": "30px",
"min-width": "30px",
"padding-left": "24px",
"padding-right": "5px",
"margin-left": "5px",
......
......@@ -673,7 +673,7 @@
"cursor": "pointer",
"height": "25px",
"line-height": "25px",
"width": "30px",
"min-width": "30px",
"padding-left": "24px",
"padding-right": "5px",
"margin-left": "5px",
......
......@@ -210,7 +210,7 @@
"cursor": "pointer",
"height": "25px",
"line-height": "25px",
"width": "30px",
"min-width": "30px",
"padding-left": "24px",
"padding-right": "5px",
"margin-left": "5px",
......
......@@ -596,7 +596,7 @@
"cursor": "pointer",
"height": "25px",
"line-height": "25px",
"width": "30px",
"min-width": "30px",
"padding-left": "24px",
"padding-right": "5px",
"margin-left": "5px",
......
......@@ -535,7 +535,7 @@
"cursor": "pointer",
"height": "25px",
"line-height": "25px",
"width": "30px",
"min-width": "30px",
"padding-left": "24px",
"padding-right": "5px",
"margin-left": "5px",
......
......@@ -30,12 +30,14 @@
<td class="editTableTitle">{{$.lp.writingBoard}}<br/>{{$.lp.width}}:</td>
<td class="editTableValue">
<input type="text" name="tabletWidth" value="text{$.tabletWidth}" class="editTableInputNoWidth" style="width: 100px;margin-right:5px;" />px
<div style="color: #666">({{$.lp.tabletSizeNote}})</div>
</td>
</tr>
<tr id="text{$.pid}tabletHeight" style="display: text{($.isHandwriting=='no')?'none':''};">
<td class="editTableTitle">{{$.lp.writingBoard}}<br/>{{$.lp.height}}:</td>
<td class="editTableValue">
<input type="text" name="tabletHeight" value="text{$.tabletHeight}" class="editTableInputNoWidth" style="width: 100px;;margin-right:5px;" />px
<div style="color: #666">({{$.lp.tabletSizeNote}})</div>
</td>
</tr>
<tr>
......
......@@ -47,7 +47,7 @@
"cursor": "pointer",
"height": "25px",
"line-height": "25px",
"width": "30px",
"min-width": "30px",
"padding-left": "24px",
"padding-right": "5px",
"margin-left": "5px",
......
......@@ -27,12 +27,24 @@
<td class="editTableTitle">{{$.lp.tabletWidth}}</td>
<td class="editTableValue">
<input type="text" name="tabletWidth" value="text{$.tabletWidth}" class="editTableInputNoWidth" style="width: 100px;"/>px
<div style="color: #666">({{$.lp.tabletSizeNote}})</div>
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.tabletHeight}}</td>
<td class="editTableValue">
<input type="text" name="tabletHeight" value="text{$.tabletHeight}" class="editTableInputNoWidth" style="width: 100px;"/>px
<div style="color: #666">({{$.lp.tabletSizeNote}})</div>
</td>
</tr>
<tr>
<td class="editTableTitle">{{$.lp.actionBar}}:</td>
<td class="editTableValue">
<input class="editTableRadio" name="toolHidden" text{(($.toolHidden || []).indexOf('size')!=-1)?'checked':''} type="checkbox" value="size"/>{{$.lp.hideSizeButton}}<br/>
<input class="editTableRadio" name="toolHidden" text{(($.toolHidden || []).indexOf('color')!=-1)?'checked':''} type="checkbox" value="color"/>{{$.lp.hideColorButton}}<br/>
<input class="editTableRadio" name="toolHidden" text{(($.toolHidden || []).indexOf('image')!=-1)?'checked':''} type="checkbox" value="image"/>{{$.lp.hideImageButton}}<br/>
<input class="editTableRadio" name="toolHidden" text{(($.toolHidden || []).indexOf('imageClipper')!=-1)?'checked':''} type="checkbox" value="imageClipper"/>{{$.lp.hideImageClipperButton}}<br/>
<div style="color: #666">({{$.lp.tabletToolbarNote}})</div>
</td>
</tr>
</table>
......
......@@ -594,6 +594,11 @@ MWF.xApplication.process.FormDesigner.LP = {
"hideModeButton": "Hide Mode Button",
"showInDatagrid": "Show In Datagrid",
"hideSizeButton": "Hide Size Button",
"hideColorButton": "Hide Color Button",
"hideImageButton": "Hide the Insert Picture Button",
"hideImageClipperButton": "Hide ImageClipper Button",
"tableSize": "Table Size",
"row": "Row",
"col": "Column",
......
......@@ -597,6 +597,11 @@ MWF.xApplication.process.FormDesigner.LP = {
"hideModeButton": "隐藏模式操作",
"showInDatagrid": "数据网格中的展现",
"hideSizeButton": "隐藏粗细按钮",
"hideColorButton": "隐藏颜色按钮",
"hideImageButton": "隐藏插入图片按钮",
"hideImageClipperButton": "隐藏图片剪切按钮",
"tableSize": "表格大小",
"row": "",
"col": "",
......@@ -1205,7 +1210,9 @@ MWF.xApplication.process.FormDesigner.LP = {
"logoUrl":"logo链接"
},
"tabletWidth": "手写板宽度",
"tabletHeight": "手写板高度"
"tabletHeight": "手写板高度",
"tabletSizeNote": "仅PC端有效,移动端横向满屏",
"tabletToolbarNote": "仅PC端有效,移动端不显示"
},
"actionBar": {
"close":"关闭",
......
......@@ -487,7 +487,6 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
}
},
setBusinessDataById: function(v, id){
debugger;
//对id类似于 xx..0..xx 的字段进行拆分
var evdata = this.form.Macro.environment.data;
var data = this.form.businessData.data;
......
......@@ -360,7 +360,12 @@ MWF.xApplication.process.Xform.Opinion = MWF.APPOpinion = new Class(
this.previewNode.destroy();
this.previewNode = null;
}
if(this.json.isHandwritingPreview!=="no") this.previewNode = new Element("img", {"src": base64Image}).inject(this.node);
if(this.json.isHandwritingPreview!=="no"){
this.previewNode = new Element("img", {"src": base64Image}).inject(this.node);
this.previewNode.setStyles({
"max-width": "90%"
})
}
this.handwritingNode.hide();
// this.page.get("div_image").node.set("src",base64Image);
}.bind(this),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册