流程发布自适应画布大小

This commit is contained in:
mrs_12345@163.com 2022-07-08 19:37:51 +08:00
parent fa0d386fa5
commit 5b418056e8

View File

@ -639,6 +639,36 @@
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
$('#content_zoom').append(Math.round(Designer.config.scale * 100) + "%") $('#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(); var output = initOutputFileLink();
if (output != 0) { if (output != 0) {
output = 40; output = 40;