流程发布自适应画布大小
This commit is contained in:
parent
fa0d386fa5
commit
5b418056e8
@ -639,6 +639,36 @@
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#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为下方评论行高
|
||||
}
|
||||
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')
|
||||
}
|
||||
function resizeCanvas(type) {
|
||||
if (type == 'height') {
|
||||
if($("#canvas_container").height() <= winSize.h) {
|
||||
return
|
||||
} else {
|
||||
canvasresizeMin()
|
||||
resizeCanvas('height')
|
||||
}
|
||||
} else {
|
||||
if($("#canvas_container").width() <= winSize.w) {
|
||||
return
|
||||
} else {
|
||||
canvasresizeMin()
|
||||
resizeCanvas('width')
|
||||
}
|
||||
}
|
||||
}
|
||||
var output = initOutputFileLink();
|
||||
if (output != 0) {
|
||||
output = 40;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user