Changeset 167:986132e819d5 for source
- Timestamp:
- Jan 18, 2010, 4:22:17 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/wz_jsgraphics.js
r30 r167 1 1 /* This notice must be untouched at all times. 2 2 3 wz_jsgraphics.js v. 3.0 23 wz_jsgraphics.js v. 3.05 4 4 The latest version is available at 5 5 http://www.walterzorn.com … … 7 7 or http://www.walterzorn.de 8 8 9 Copyright (c) 2002-200 4Walter Zorn. All rights reserved.9 Copyright (c) 2002-2009 Walter Zorn. All rights reserved. 10 10 Created 3. 11. 2002 by Walter Zorn (Web: http://www.walterzorn.com ) 11 Last modified: 2 6. 10. 200711 Last modified: 2. 2. 2009 12 12 13 13 Performance optimizations for Internet Explorer … … 46 46 47 47 48 function _chkDHTM(x, i) 49 { 50 x = document.body || null; 51 jg_ie = x && typeof x.insertAdjacentHTML != "undefined" && document.createElement; 48 function _chkDHTM(wnd, x, i) 49 // Under XUL, owner of 'document' must be specified explicitly 50 { 51 x = wnd.document.body || null; 52 jg_ie = x && typeof x.insertAdjacentHTML != "undefined" && wnd.document.createElement; 52 53 jg_dom = (x && !jg_ie && 53 54 typeof x.appendChild != "undefined" && 54 typeof document.createRange != "undefined" &&55 typeof (i = document.createRange()).setStartBefore != "undefined" &&55 typeof wnd.document.createRange != "undefined" && 56 typeof (i = wnd.document.createRange()).setStartBefore != "undefined" && 56 57 typeof i.createContextualFragment != "undefined"); 57 jg_fast = jg_ie && document.all && !window.opera;58 jg_fast = jg_ie && wnd.document.all && !wnd.opera; 58 59 jg_moz = jg_dom && typeof x.style.MozOpacity != "undefined"; 59 60 jg_ok = !!(jg_ie || jg_dom); … … 124 125 _regex, 125 126 '<div style="overflow:hidden;position:absolute;background-color:'+ 126 '$1;left:$2 ;top:$3;width:$4;height:$5"></div>\n');127 '$1;left:$2px;top:$3px;width:$4px;height:$5px"></div>\n'); 127 128 } 128 129 … … 132 133 _regex, 133 134 '<div style="overflow:hidden;position:absolute;background-color:'+ 134 '$1;left:$2 ;top:$3;width:$4;height:$5;border-left:$4px solid $1"></div>\n');135 '$1;left:$2px;top:$3px;width:$4px;height:$5px;border-left:$4px solid $1"></div>\n'); 135 136 } 136 137 … … 911 912 'left:' + x + 'px;'+ 912 913 'top:' + y + 'px;'+ 913 'width:' + w + 'px;'+ 914 'height:' + h + 'px;">'+ 915 '<img src="' + imgSrc + '" width="' + w + '" height="' + h + '"' + (a? (' '+a) : '') + '>'+ 914 // w (width) and h (height) arguments are now optional. 915 // Added by Mahmut Keygubatli, 14.1.2008 916 (w? ('width:' + w + 'px;') : '') + 917 (h? ('height:' + h + 'px;'):'')+'">'+ 918 '<img src="' + imgSrc +'"'+ (w ? (' width="' + w + '"'):'')+ (h ? (' height="' + h + '"'):'') + (a? (' '+a) : '') + '>'+ 916 919 '<\/div>'; 917 920 }; … … 1022 1025 this.wnd = wnd || window; 1023 1026 1024 if(!jg_ok) _chkDHTM( );1027 if(!jg_ok) _chkDHTM(this.wnd); 1025 1028 if(jg_ok) 1026 1029 {
Note: See TracChangeset
for help on using the changeset viewer.