Bug #3679 » 0008-Defer-size-initialization-for-WDialog-resize.patch
| src/js/Resizable.js | ||
|---|---|---|
|
var handler = null, downXY = null,
|
||
|
iwidth, iheight, /* initial CSS width and height */
|
||
|
cwidth, cheight, /* initial client width and height */
|
||
|
minwidth, minheight;
|
||
|
var cssMinWidth = WT.css(el, 'minWidth'),
|
||
|
cssMinHeight = WT.css(el, 'minHeight');
|
||
|
if (WT.isIE6) {
|
||
|
/*
|
||
|
* IE6 does not support min-width, min-height, but still provides them
|
||
|
* in the cssText
|
||
|
*/
|
||
|
function fishCssText(el, property) {
|
||
|
var m = new RegExp(property + ":\\s*(\\d+(?:\\.\\d+)?)\\s*px", "i")
|
||
|
.exec(el.style.cssText);
|
||
|
return (m && m.length == 2) ? m[1] + 'px' : '';
|
||
|
}
|
||
|
cssMinWidth = fishCssText(el, 'min-width');
|
||
|
cssMinHeight = fishCssText(el, 'min-height');
|
||
|
}
|
||
|
if (cssMinWidth == '0px')
|
||
|
minwidth = el.clientWidth;
|
||
|
else
|
||
|
minwidth = WT.parsePx(cssMinWidth);
|
||
|
if (cssMinHeight == '0px')
|
||
|
minheight = el.clientHeight;
|
||
|
else
|
||
|
minheight = WT.parsePx(cssMinHeight);
|
||
|
minwidth, minheight,
|
||
|
cssMinWidth, cssMinHeight;
|
||
|
function onMouseMove(event) {
|
||
|
var xy = WT.pageCoordinates(event);
|
||
| ... | ... | |
|
var xy = WT.widgetCoordinates(el, event);
|
||
|
if (el.offsetWidth - xy.x < 16 && el.offsetHeight - xy.y < 16) {
|
||
|
if (!cssMinWidth) {
|
||
|
cssMinWidth = WT.css(el, 'minWidth'),
|
||
|
cssMinHeight = WT.css(el, 'minHeight');
|
||
|
if (WT.isIE6) {
|
||
|
/*
|
||
|
* IE6 does not support min-width, min-height, but still provides them
|
||
|
* in the cssText
|
||
|
*/
|
||
|
function fishCssText(el, property) {
|
||
|
var m = new RegExp(property + ":\\s*(\\d+(?:\\.\\d+)?)\\s*px", "i")
|
||
|
.exec(el.style.cssText);
|
||
|
return (m && m.length == 2) ? m[1] + 'px' : '';
|
||
|
}
|
||
|
cssMinWidth = fishCssText(el, 'min-width');
|
||
|
cssMinHeight = fishCssText(el, 'min-height');
|
||
|
}
|
||
|
if (cssMinWidth == '0px')
|
||
|
minwidth = el.clientWidth;
|
||
|
else
|
||
|
minwidth = WT.parsePx(cssMinWidth);
|
||
|
if (cssMinHeight == '0px')
|
||
|
minheight = el.clientHeight;
|
||
|
else
|
||
|
minheight = WT.parsePx(cssMinHeight);
|
||
|
}
|
||
|
downXY = WT.pageCoordinates(event);
|
||
|
iwidth = WT.innerWidth(el);
|
||
|
iheight = WT.innerHeight(el);
|
||