流程发布适应高宽
This commit is contained in:
parent
dbe84f0e9b
commit
bf7e1bb236
@ -641,27 +641,28 @@
|
||||
$('#content_zoom').append(Math.round(Designer.config.scale * 100) + "%")
|
||||
var winSize = {
|
||||
w: $(window).width() - 332,
|
||||
h: $(window).height() - $('#toolbarName').height() - $('#tools').height() - 41 - 40 - 70 // 41为文件名行高 40为文件属性行高 70为下方评论行高
|
||||
h: $(window).height() - $('#tools').height() - 41 - 40 - 70 // 41为文件名行高 40为最下方功能区域 70为下方评论行高
|
||||
}
|
||||
var designerSize = {
|
||||
w: $("#canvas_container").width(),
|
||||
h: $("#canvas_container").height()
|
||||
}
|
||||
if (designerSize.w <= designerSize.h && designerSize.h > winSize.h) {
|
||||
resizeCanvas('height')
|
||||
} else if(designerSize.w > designerSize.h && designerSize.w > winSize.w) {
|
||||
resizeCanvas('width')
|
||||
} else if(designerSize.w > designerSize.h && designerSize.w > winSize.w) {
|
||||
resizeCanvas('height')
|
||||
}
|
||||
function resizeCanvas(type) {
|
||||
if (type == 'height') {
|
||||
if($("#canvas_container").height() <= winSize.h) {
|
||||
console.log(Designer.config.scale)
|
||||
if($("#canvas_container").height() <= winSize.h || Designer.config.scale <= 0.25) {
|
||||
return
|
||||
} else {
|
||||
canvasresizeMin()
|
||||
resizeCanvas('height')
|
||||
}
|
||||
} else {
|
||||
if($("#canvas_container").width() <= winSize.w) {
|
||||
if($("#canvas_container").width() <= winSize.w || Designer.config.scale <= 0.25) {
|
||||
return
|
||||
} else {
|
||||
canvasresizeMin()
|
||||
|
||||
@ -1445,6 +1445,7 @@ function isObjectRelationshipModel(linker, isAlert) {
|
||||
|
||||
// 文件属性的处理
|
||||
function initProcessDesc() {
|
||||
console.log(processDesc)
|
||||
var length = Object.keys(processDesc).length;
|
||||
var t = '';
|
||||
for(var i = 1; i <= length; i++) {
|
||||
@ -1457,13 +1458,18 @@ function initProcessDesc() {
|
||||
t += '<td colspan="2" class="tableContent">' + value + '</td>';
|
||||
t += '</tr>';
|
||||
} else if(obj.type == 'table') {
|
||||
let tableValue = JSON.parse(value.replace(/"/g,'\"'))
|
||||
let tableFlag = '请输入'
|
||||
if (tableValue.table.length > 1) {
|
||||
tableFlag = '请查看'
|
||||
if(value == '') {
|
||||
t += '<td colspan="2" class="tableContent">' + value + '</td>';
|
||||
t += '</tr>';
|
||||
} else {
|
||||
let tableValue = JSON.parse(value.replace(/"/g,'\"'))
|
||||
let tableFlag = '请输入'
|
||||
if (tableValue.table.length > 1) {
|
||||
tableFlag = '请查看'
|
||||
}
|
||||
t += '<td colspan="2" class="tableContent" onclick="openDialog(' + JSON.stringify(tableValue).replace(/\"/g,"'") +')">' + tableFlag + '</td>';
|
||||
t += '</tr>';
|
||||
}
|
||||
t += '<td colspan="2" class="tableContent" onclick="openDialog(' + JSON.stringify(tableValue).replace(/\"/g,"'") +')">' + tableFlag + '</td>';
|
||||
t += '</tr>';
|
||||
}
|
||||
else {
|
||||
value = value.replace(/\n/g,'<br>')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user