|
|
@ -206,6 +206,7 @@ $(function(){
|
|
|
|
|
|
|
|
|
|
|
|
// window resize
|
|
|
|
// window resize
|
|
|
|
$(window).on('resize', function() {
|
|
|
|
$(window).on('resize', function() {
|
|
|
|
|
|
|
|
// _resizeVNC_if_needed()
|
|
|
|
$('.CodeMirror.cm-s-railscasts').css("height", $("#games_repository_contents").height() - repositoryTabHeight);
|
|
|
|
$('.CodeMirror.cm-s-railscasts').css("height", $("#games_repository_contents").height() - repositoryTabHeight);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
@ -1182,6 +1183,7 @@ $(function(){ // 这里重新加一次事件监听,不在原有事件的基
|
|
|
|
dragging = true;
|
|
|
|
dragging = true;
|
|
|
|
dragDom = lab;
|
|
|
|
dragDom = lab;
|
|
|
|
$('#htmlIframe').css('pointer-events', 'none')
|
|
|
|
$('#htmlIframe').css('pointer-events', 'none')
|
|
|
|
|
|
|
|
$('#can-drag').show()
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -1202,7 +1204,10 @@ $(function(){ // 这里重新加一次事件监听,不在原有事件的基
|
|
|
|
|
|
|
|
|
|
|
|
doc.live("mouseup", function(e) {
|
|
|
|
doc.live("mouseup", function(e) {
|
|
|
|
// 在大窗口将下边测试集滚动条拖上去后,将窗口缩小,再拖下来就有这种情况 https://www.trustie.net/issues/16326
|
|
|
|
// 在大窗口将下边测试集滚动条拖上去后,将窗口缩小,再拖下来就有这种情况 https://www.trustie.net/issues/16326
|
|
|
|
|
|
|
|
$('#can-drag').hide()
|
|
|
|
|
|
|
|
|
|
|
|
if (dragging === true) {
|
|
|
|
if (dragging === true) {
|
|
|
|
|
|
|
|
// _resizeVNC_if_needed()
|
|
|
|
window.editor_CodeMirror && window.editor_CodeMirror.refresh()
|
|
|
|
window.editor_CodeMirror && window.editor_CodeMirror.refresh()
|
|
|
|
// 使得iframe可以继续捕获事件
|
|
|
|
// 使得iframe可以继续捕获事件
|
|
|
|
$('#htmlIframe').css('pointer-events', 'inherit')
|
|
|
|
$('#htmlIframe').css('pointer-events', 'inherit')
|
|
|
@ -1210,6 +1215,27 @@ $(function(){ // 这里重新加一次事件监听,不在原有事件的基
|
|
|
|
dragging = false;
|
|
|
|
dragging = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
function _resizeVNC_if_needed() {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (window.__isVNC) {
|
|
|
|
|
|
|
|
// $('#screen>div').width('1024px').height('768px')
|
|
|
|
|
|
|
|
var trueHeight = $('#game_right_contents').height();
|
|
|
|
|
|
|
|
var width = $('#game_right_contents').width()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// __rfb && __rfb.get_display().autoscale(width, trueHeight)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (trueHeight < 768) {
|
|
|
|
|
|
|
|
var width = $('#game_right_contents').width()
|
|
|
|
|
|
|
|
var _left = width - $('#screen').width() / 2
|
|
|
|
|
|
|
|
var scale = (trueHeight / 768).toFixed(5)
|
|
|
|
|
|
|
|
// _left
|
|
|
|
|
|
|
|
$('#screen').css('transform', 'scale(' + scale + ', ' + scale +')').css('transform-origin', 0 + 'px 0px')
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$('#screen').css('transform', 'scale(' + 1 + ', ' + 1 +')')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------------------------
|
|
|
|
// ---------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|