Merge branch 'issue245' into develop
This commit is contained in:
commit
0ad0380418
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -24,7 +24,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function (HUB,HTML,AJAX,CALLBACK,OUTPUT) {
|
(function (HUB,HTML,AJAX,CALLBACK,OUTPUT) {
|
||||||
var VERSION = "2.0.5";
|
var VERSION = "2.0.6";
|
||||||
|
|
||||||
var SIGNAL = MathJax.Callback.Signal("menu") // signal for menu events
|
var SIGNAL = MathJax.Callback.Signal("menu") // signal for menu events
|
||||||
|
|
||||||
|
@ -50,7 +50,9 @@
|
||||||
windowSettings: { // for source window
|
windowSettings: { // for source window
|
||||||
status: "no", toolbar: "no", locationbar: "no", menubar: "no",
|
status: "no", toolbar: "no", locationbar: "no", menubar: "no",
|
||||||
directories: "no", personalbar: "no", resizable: "yes", scrollbars: "yes",
|
directories: "no", personalbar: "no", resizable: "yes", scrollbars: "yes",
|
||||||
width: 100, height: 50
|
width: 400, height: 300,
|
||||||
|
left: Math.round((screen.width - 400)/2),
|
||||||
|
top: Math.round((screen.height - 300)/3)
|
||||||
},
|
},
|
||||||
|
|
||||||
styles: {
|
styles: {
|
||||||
|
@ -700,7 +702,7 @@
|
||||||
return MENU.ShowSource.w;
|
return MENU.ShowSource.w;
|
||||||
};
|
};
|
||||||
MENU.ShowSource.Text = function (text,event) {
|
MENU.ShowSource.Text = function (text,event) {
|
||||||
var w = MENU.ShowSource.Window(event);
|
var w = MENU.ShowSource.Window(event); delete MENU.ShowSource.w;
|
||||||
text = text.replace(/^\s*/,"").replace(/\s*$/,"");
|
text = text.replace(/^\s*/,"").replace(/\s*$/,"");
|
||||||
text = text.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
|
text = text.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
|
||||||
if (MENU.isMobile) {
|
if (MENU.isMobile) {
|
||||||
|
@ -717,17 +719,18 @@
|
||||||
w.document.write("</body></html>");
|
w.document.write("</body></html>");
|
||||||
w.document.close();
|
w.document.close();
|
||||||
var table = w.document.body.firstChild;
|
var table = w.document.body.firstChild;
|
||||||
var H = (w.outerHeight-w.innerHeight)||30, W = (w.outerWidth-w.innerWidth)||30;
|
setTimeout(function () {
|
||||||
W = Math.min(Math.floor(.5*screen.width),table.offsetWidth+W+25);
|
var H = (w.outerHeight-w.innerHeight)||30, W = (w.outerWidth-w.innerWidth)||30, x, y;
|
||||||
H = Math.min(Math.floor(.5*screen.height),table.offsetHeight+H+25);
|
W = Math.max(100,Math.min(Math.floor(.5*screen.width),table.offsetWidth+W+25));
|
||||||
w.resizeTo(W,H);
|
H = Math.max(40,Math.min(Math.floor(.5*screen.height),table.offsetHeight+H+25));
|
||||||
if (event && event.screenX != null) {
|
w.resizeTo(W,H);
|
||||||
var x = Math.max(0,Math.min(event.screenX-Math.floor(W/2), screen.width-W-20)),
|
if (event && event.screenX != null) {
|
||||||
y = Math.max(0,Math.min(event.screenY-Math.floor(H/2), screen.height-H-20));
|
x = Math.max(0,Math.min(event.screenX-Math.floor(W/2), screen.width-W-20));
|
||||||
w.moveTo(x,y);
|
y = Math.max(0,Math.min(event.screenY-Math.floor(H/2), screen.height-H-20));
|
||||||
}
|
w.moveTo(x,y);
|
||||||
|
}
|
||||||
|
},50);
|
||||||
}
|
}
|
||||||
delete MENU.ShowSource.w;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user