Fixed IE9/IE10 control panel scaling bug
This commit is contained in:
parent
6bbec414bd
commit
5477c1ae3e
6 changed files with 22 additions and 10 deletions
|
|
@ -258,6 +258,18 @@ Panel.prototype.setBinding = function(sHTMLType, sBinding, control)
|
|||
this.canvas = control;
|
||||
this.context = this.canvas.getContext("2d");
|
||||
|
||||
/*
|
||||
* Employ the same gross onresize() hack for IE9/IE10 that we had to use for the Video canvas
|
||||
*/
|
||||
if (web.getUserAgent().indexOf("MSIE") >= 0) {
|
||||
this.canvas.onresize = function(canvas, cx, cy) {
|
||||
return function onResizeVideo() {
|
||||
canvas.style.height = (((canvas.clientWidth * cy) / cx) | 0) + "px";
|
||||
};
|
||||
}(this.canvas, this.canvas.width, this.canvas.height);
|
||||
this.canvas.onresize();
|
||||
}
|
||||
|
||||
this.xMem = this.yMem = 0;
|
||||
this.cxMem = ((this.canvas.width * Panel.LIVEMEM.CX) / Panel.LIVECANVAS.CX) | 0;
|
||||
this.cyMem = this.canvas.height;
|
||||
|
|
|
|||
|
|
@ -5280,12 +5280,12 @@ Video.init = function()
|
|||
*/
|
||||
eCanvas.style.height = "auto";
|
||||
if (web.getUserAgent().indexOf("MSIE") >= 0) {
|
||||
eCanvas.style.height = (((eVideo.clientWidth * parmsVideo['screenHeight']) / parmsVideo['screenWidth']) | 0) + "px";
|
||||
eVideo.onresize = function(eParent, eChild, cx, cy) {
|
||||
return function onResizeVideo() {
|
||||
eChild.style.height = (((eParent.clientWidth * cy) / cx) | 0) + "px";
|
||||
};
|
||||
}(eVideo, eCanvas, parmsVideo['screenWidth'], parmsVideo['screenHeight']); // jshint ignore:line
|
||||
}(eVideo, eCanvas, parmsVideo['screenWidth'], parmsVideo['screenHeight']);
|
||||
eVideo.onresize();
|
||||
}
|
||||
eVideo.appendChild(eCanvas);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue