rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
if (cached.content_type == 'text/plain') { | if (cached.type == 'text/plain') { | function mangle_deb_bugnumbers(cached, vs) { if (!cached.uri.match(/^[a-z0-9]+:\/\/[a-z0-9A-Z.-]+debian\.org/) && !cached.uri.match(/changelog\.Debian/)) return true; var num_re = /([0-9]+)/g; var rewrite_closes_fn = function (str) { return str.replace(num_re, '<a href="http://bugs.debian.org/$1">$1</a>'); } /* Debian Policy Manual 4.4 footnote 16 */ var closes_re = /closes:\s*(?:bug)?\#?\s?\d+(?:,\s*(?:bug)?\#?\s?\d+)*/gi; var new_content = cached.content.replace(closes_re, rewrite_closes_fn); if (cached.content_type == 'text/plain') { cached.content = '<pre>' + new_content + '</pre>'; vs.plain = "0"; } else { cached.content = new_content; } return true;} |
Sortable._marker.style.zIndex = 'absolute'; | mark: function(dropon, position) { if(!Sortable._marker) { Sortable._marker = document.createElement('DIV'); Element.hide(Sortable._marker); Element.Class.add(Sortable._marker, 'dropmarker'); Sortable._marker.style.position = 'absolute'; Sortable._marker.style.zIndex = 'absolute'; document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); } var offsets = Position.cumulativeOffset(dropon); Sortable._marker.style.top = offsets[1] + 'px'; if(position=='after') Sortable._marker.style.top = (offsets[1]+dropon.clientHeight) + 'px'; Sortable._marker.style.left = offsets[0] + 'px'; Element.show(Sortable._marker); }, |
|
Sortable._marker = document.createElement('DIV'); | Sortable._marker = $('dropmarker') || document.createElement('DIV'); | mark: function(dropon, position) { if(!Sortable._marker) { Sortable._marker = document.createElement('DIV'); Element.hide(Sortable._marker); Element.Class.add(Sortable._marker, 'dropmarker'); Sortable._marker.style.position = 'absolute'; document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); } var offsets = Position.cumulativeOffset(dropon); Sortable._marker.style.top = offsets[1] + 'px'; if(position=='after') Sortable._marker.style.top = (offsets[1]+dropon.clientHeight) + 'px'; Sortable._marker.style.left = offsets[0] + 'px'; Element.show(Sortable._marker); }, |
Sortable._marker.style.top = offsets[1] + 'px'; if(position=='after') Sortable._marker.style.top = (offsets[1]+dropon.clientHeight) + 'px'; | mark: function(dropon, position) { // mark on ghosting only var sortable = Sortable.options(dropon.parentNode); if(sortable && !sortable.ghosting) return; if(!Sortable._marker) { Sortable._marker = $('dropmarker') || document.createElement('DIV'); Element.hide(Sortable._marker); Element.addClassName(Sortable._marker, 'dropmarker'); Sortable._marker.style.position = 'absolute'; document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); } var offsets = Position.cumulativeOffset(dropon); Sortable._marker.style.top = offsets[1] + 'px'; if(position=='after') Sortable._marker.style.top = (offsets[1]+dropon.clientHeight) + 'px'; Sortable._marker.style.left = offsets[0] + 'px'; Element.show(Sortable._marker); }, |
|
Sortable._marker.style.top = offsets[1] + 'px'; if(position=='after') if(sortable.overlap == 'horizontal') Sortable._marker.style.left = (offsets[0]+dropon.clientWidth) + 'px'; else Sortable._marker.style.top = (offsets[1]+dropon.clientHeight) + 'px'; | mark: function(dropon, position) { // mark on ghosting only var sortable = Sortable.options(dropon.parentNode); if(sortable && !sortable.ghosting) return; if(!Sortable._marker) { Sortable._marker = $('dropmarker') || document.createElement('DIV'); Element.hide(Sortable._marker); Element.addClassName(Sortable._marker, 'dropmarker'); Sortable._marker.style.position = 'absolute'; document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); } var offsets = Position.cumulativeOffset(dropon); Sortable._marker.style.top = offsets[1] + 'px'; if(position=='after') Sortable._marker.style.top = (offsets[1]+dropon.clientHeight) + 'px'; Sortable._marker.style.left = offsets[0] + 'px'; Element.show(Sortable._marker); }, |
|
var sortable = Sortable.options(dropon.parentNode); if(sortable && !sortable.ghosting) return; | mark: function(dropon, position) { if(!Sortable._marker) { Sortable._marker = $('dropmarker') || document.createElement('DIV'); Element.hide(Sortable._marker); Element.Class.add(Sortable._marker, 'dropmarker'); Sortable._marker.style.position = 'absolute'; document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); } var offsets = Position.cumulativeOffset(dropon); Sortable._marker.style.top = offsets[1] + 'px'; if(position=='after') Sortable._marker.style.top = (offsets[1]+dropon.clientHeight) + 'px'; Sortable._marker.style.left = offsets[0] + 'px'; Element.show(Sortable._marker); }, |
|
this.getEntry(this.index).scrollIntoView(false); | markNext: function() { if(this.index < this.entryCount-1) this.index++ else this.index = 0; }, |
|
else this.index = this.entryCcount-1; | else this.index = this.entryCount-1; | markPrevious: function() { if(this.index > 0) this.index-- else this.index = this.entryCcount-1; }, |
this.getEntry(this.index).scrollIntoView(true); | markPrevious: function() { if(this.index > 0) this.index-- else this.index = this.entryCount-1; }, |
|
return mtchstr.match(final_mask); | return mtchstr.toUpperCase().match(final_mask.toUpperCase()); | function match_irc_mask(mtchstr,mask) { final_mask="^"; mask=mask.replace(/[.]/g,"\\\."); mask=mask.replace(/[?]/g,"."); mask=mask.replace(/[*]/g,".*?"); final_mask=final_mask + mask + "$"; return mtchstr.match(final_mask);} |
return elements.select(selector.match.bind(selector)); | return elements.select(selector.match.bind(selector)).collect(Element.extend); | matchElements: function(elements, expression) { var selector = new Selector(expression); return elements.select(selector.match.bind(selector)); }, |
PatternMatcher.matches = function(pattern, actual) { return new PatternMatcher(pattern).matches(actual); }; | this.matches = function(actual) { return this.regexp.test(actual); }; | PatternMatcher.matches = function(pattern, actual) { return new PatternMatcher(pattern).matches(actual);}; |
if (value >= (result || value)) | if (result == undefined || value >= result) | max: function(iterator) { var result; this.each(function(value, index) { value = (iterator || Prototype.K)(value, index); if (value >= (result || value)) result = value; }); return result; }, |
return(this.isVertical() ? this.track.offsetHeight - this.alignY : this.track.offsetWidth - this.alignX); | return(this.isVertical() ? (this.track.offsetHeight != 0 ? this.track.offsetHeight : this.track.style.height.replace(/px$/,"")) - this.alignY : (this.track.offsetWidth != 0 ? this.track.offsetWidth : this.track.style.width.replace(/px$/,"")) - this.alignY); | maximumOffset: function(){ return(this.isVertical() ? this.track.offsetHeight - this.alignY : this.track.offsetWidth - this.alignX); }, |
menu.style.position = 'absolute'; menu.style.zIndex = 1000; | menu.style.position = is_gecko ? 'fixed' : 'absolute'; menu.style.zIndex = 1; | function menu_init(object_name){ var menu = document.getElementById(object_name + '_menu'); var object = document.getElementById(object_name); if (menu == null|| object == null) { return; } object.onclick = function() { /* Open or close the menu */ if (menu.style.display == 'none') { menu_show(object_name); } else { menu_hide(object_name); } return false; } /* need to read more to get these working :-( object.onmouseover = function() { //menu_show(object_name); } object.onmouseout = function(e) { menu_hide(object_name); } menu.onmouseout = function(e) { menu_hide(object_name); } menu.onmouseover = function(e) { this.onmouseout = function(e) { menu_hide(object_name); } e.preventDefault(); e.stopPropagation(); } menu.onmouseout = function() { menu_hide(object_name); }*/ menu.style.display = 'none'; menu.style.position = 'absolute'; menu.style.zIndex = 1000; object.style.cursor = 'pointer';} |
if (!is_gecko) { var window_offset = (window.pageYOffset) ? window.pageYOffset : (document.body.scrollTop) ? document.body.scrollTop : document.documentElement.scrollTop; object_offsets['top'] = Number(window_offset) + object_offsets['top']; } | function menu_show(object_name){ var menu = document.getElementById(object_name + '_menu'); var object = document.getElementById(object_name); if (menu == null|| object == null) { return; } // If a menu is open, lets close it if (active_menu) { menu_hide(active_menu); } active_menu = object_name; // best to do this everytime, incase the windows is resized var object_offsets = get_offsets(object); menu.style.clip = 'rect(auto, auto, 0px, auto)'; menu.style.display = ''; if ((object_offsets['left'] + menu.offsetWidth) > document.body.clientWidth) { // It to wide to show on the right so we have to put it on the left menu.style.left = (object_offsets['left'] + object.offsetWidth - menu.offsetWidth) + 'px'; } else { menu.style.left = object_offsets['left'] + 'px'; } menu.style.top = (object_offsets['top'] + object.offsetHeight) + 'px'; start_slide(object_name+ '_menu', menu.offsetHeight);} |
|
function menuOut() { document.onclick = eventHideMenu; if (document.all) event.cancelBubble=true } | function menuOut() { document.onclick = eventHideMenu; if (window.event != null) window.event.cancelBubble=true; } | function menuOut() { document.onclick = eventHideMenu; if (document.all) event.cancelBubble=true } |
function menuOver() { document.onclick = null; if (document.all) event.cancelBubble=true } | function menuOver() { document.onclick = null; if (window.event != null) window.event.cancelBubble=true; } | function menuOver() { document.onclick = null; if (document.all) event.cancelBubble=true } |
if (!AutoValidator.validate(formObj)) { alert(tinyMCE.getLang('lang_invalid_data')); return false; } | function mergeCells() { var args = new Array(); var formObj = document.forms[0]; args["numcols"] = formObj.numcols.value; args["numrows"] = formObj.numrows.value; tinyMCEPopup.execCommand("mceTableMergeCells", false, args); tinyMCEPopup.close();} |
|
this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"; | this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"+ctrl('O')+ctrl('U')+ctrl('T')+ctrl('K')+ctrl('P'); | function Messagemenu(){ var width=31; if(width<8+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name.length) width=8+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name.length this.items=new Array(); this.xpos=7; this.ypos=2; this.lpadding="\xb3"; this.rpadding="\xb3"; this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"; this.add(top_bar(width),undefined,undefined,"",""); this.add("|Change Sub","C",width); this.add("|Read "+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name,"R",width); this.add( format_opt("Scan For |New Messages",width,true) ,"N",width ); this.add( format_opt("Scan For Messages To |You",width,true) ,"Y",width ); this.add( format_opt("Search For |Text in Messages",width,true) ,"T",width ); this.add("|Post In "+msg_area.grp_list[bbs.curgrp].sub_list[bbs.cursub].name,"P",width,undefined,undefined,user.compare_ars("REST P")); if(user.compare_ars("REST N") && (msg_area.grp_list[bbs.curgrp].sub_list[bbs.crusub] & (SUB_QNET|SUB_PNET|SUB_FIDO))) this.items[6].disabed=true; this.add("Read/Post |Auto-Message","A",width); this.add("|QWK Packet Transfer Menu","Q",width); this.add("|View Information on Sub","V",width); this.add(bottom_bar(width),undefined,undefined,"",""); this.timeout=100; this.callback=message_callback;} |
if (value <= (result || value)) | if (result == undefined || value < result) | min: function(iterator) { var result; this.each(function(value, index) { value = (iterator || Prototype.K)(value, index); if (value <= (result || value)) result = value; }); return result; }, |
return new Color(rgb); | return new Color(rgb, 'rgb'); | mix: function(){ var colors = $A(arguments); var alpha = ($type(colors[colors.length-1]) == 'number') ? colors.pop() : 50; var rgb = this.copy(); colors.each(function(color){ color = new Color(color); for (var i = 0; i < 3; i++) rgb[i] = Math.round((rgb[i] / 100 * (100 - alpha)) + (color[i] / 100 * alpha)); }); return new Color(rgb); }, |
if (colors.length == 2 && $type(colors[1]) == 'number'){ alpha = colors[1]; colors.pop(); } var mixed = this; | if ($type(colors[colors.length-1]) == 'number') alpha = colors.pop(); var mixed = this.copy(); | mix: function(){ var colors = $A(arguments); var alpha = 50; if (colors.length == 2 && $type(colors[1]) == 'number'){ alpha = colors[1]; colors.pop(); } var mixed = this; colors.each(function(color){ var rgb = []; color = new Color(color); for (var i = 0; i < 3; i++) rgb.push(Math.round((mixed[i] / 100 * (100 - alpha)) + (color[i] / 100 * alpha))); mixed = new Color(rgb); }); return mixed; }, |
var rgb = []; | mix: function(){ var colors = $A(arguments); var alpha = 50; if (colors.length == 2 && $type(colors[1]) == 'number'){ alpha = colors[1]; colors.pop(); } var mixed = this; colors.each(function(color){ var rgb = []; color = new Color(color); for (var i = 0; i < 3; i++) rgb.push(Math.round((mixed[i] / 100 * (100 - alpha)) + (color[i] / 100 * alpha))); mixed = new Color(rgb); }); return mixed; }, |
|
for (var i = 0; i < 3; i++) rgb.push(Math.round((mixed[i] / 100 * (100 - alpha)) + (color[i] / 100 * alpha))); mixed = new Color(rgb); | for (var i = 0; i < 3; i++) mixed[i] = Math.round((mixed[i] / 100 * (100 - alpha)) + (color[i] / 100 * alpha)); | mix: function(){ var colors = $A(arguments); var alpha = 50; if (colors.length == 2 && $type(colors[1]) == 'number'){ alpha = colors[1]; colors.pop(); } var mixed = this; colors.each(function(color){ var rgb = []; color = new Color(color); for (var i = 0; i < 3; i++) rgb.push(Math.round((mixed[i] / 100 * (100 - alpha)) + (color[i] / 100 * alpha))); mixed = new Color(rgb); }); return mixed; }, |
cocoon.sendStatus(201); | sendStatus(201); | function mkcol() { var status = executeUsecase("webdav.mkcol"); if(status) cocoon.sendStatus(201); else sendStatus(403);} |
var fullURL = "/TestRunner.html?singletest=" + escape(browserBot.modalDialogTest) + "&autoURL=" + escape(url) + "&runInterval=" + runInterval; | var doc_location = document.location.toString(); var end_of_base_ref = doc_location.indexOf('TestRunner.html') var base_ref = doc_location.substring(0,end_of_base_ref) var fullURL = base_ref + "TestRunner.html?singletest=" + escape(browserBot.modalDialogTest) + "&autoURL=" + escape(url) + "&runInterval=" + runInterval; | function modifyWindowToRecordPopUpDialogs(window, browserBot) { // we will call the previous version of this method from within our own interception oldShowModalDialog = window.showModalDialog; window.showModalDialog = function(url, args, features) { var fullURL = "/TestRunner.html?singletest=" + escape(browserBot.modalDialogTest) + "&autoURL=" + escape(url) + "&runInterval=" + runInterval; browserBot.modalDialogTest = null; var returnValue = oldShowModalDialog(fullURL, args, features); //window.open(fullURL); //alert(returnValue); return returnValue; }; window.alert = function(alert){browserBot.recordedAlerts.push(alert);}; window.confirm = function(message){ browserBot.recordedConfirmations.push(message); var result = browserBot.nextConfirmResult; browserBot.nextConfirmResult = true; return result; }; } |
onStateChange: Class.empty | evalResponse: false, method: 'post' | moreOptions: function(){ return { postBody: null, update: null, evalScripts: false, onStateChange: Class.empty }; }, |
"setup bg input " + value( 'mosaic_bg_input' ) + "\n"; | "setup bg input " + sanitize_input( value( 'mosaic_bg_input' ) ) + "\n"; | function mosaic_code_update(){ var code = document.getElementById( 'mosaic_code' ); code.value ="##################################\n"+"## HTTP interface mosaic wizard ##\n"+"##################################\n"+"\n"+"# Comment the following line if you don't want to reset your VLM configuration\n"+"del all\n"+"\n"+"# Background options\n"+"new bg broadcast enabled\n"+"setup bg input " + value( 'mosaic_bg_input' ) + "\n"; if( value( 'mosaic_output' ) ) { code.value +="setup bg output " + value( 'mosaic_output' )+ "\n"; } var o = /.*transcode.*/; if(! o.test( value( 'mosaic_output' ) ) ) { code.value +="setup bg option sub-filter=mosaic\n"; } code.value+="\n"+"# Mosaic options\n"+"setup bg option mosaic-alpha=" + mosaic_alpha + "\n"+"setup bg option mosaic-height=" + mosaic_height + "\n"+"setup bg option mosaic-width=" + mosaic_width + "\n"+"setup bg option mosaic-align=" + mosaic_align + "\n"+"setup bg option mosaic-xoffset=" + mosaic_xoffset + "\n"+"setup bg option mosaic-yoffset=" + mosaic_yoffset + "\n"+"setup bg option mosaic-vborder=" + mosaic_vborder + "\n"+"setup bg option mosaic-hborder=" + mosaic_hborder + "\n"+"setup bg option mosaic-position=" + mosaic_position + "\n"+"setup bg option mosaic-rows=" + mosaic_rows + "\n"+"setup bg option mosaic-cols=" + mosaic_cols + "\n"+"setup bg option mosaic-order="; for( y = 0; y < mosaic_rows; y++ ) { for( x = 0; x < mosaic_cols; x++ ) { var id = x+'_'+y; if( cells[id] ) code.value += cells[id]; else code.value += '_'; if( y != mosaic_rows - 1 || x != mosaic_cols - 1 ) code.value += ','; } } code.value += "\n"+"setup bg option mosaic-delay=" + mosaic_delay + "\n"+"setup bg option mosaic-keep-picture\n"+"\n"+"# Input options\n"; var x, y; for( y = 0; y < mosaic_rows; y++ ) { for( x = 0; x < mosaic_cols; x++ ) { var id = x+'_'+y; if( cells[id] ) { var s = cells[id]; code.value +="new " + s + " broadcast enabled\n"+"setup " + s + " input " + streams[s] + "\n"+"setup " + s + " output #duplicate{dst=mosaic-bridge{id=" + s + ",width="+cell_width+",height="+cell_height+"},select=video,dst=bridge-out,select=audio}\n"+"\n"; } } } code.value +="# Launch everything\n"+"control bg play\n"; for( y = 0; y < mosaic_rows; y++ ) { for( x = 0; x < mosaic_cols; x++ ) { var id = x+'_'+y; if( cells[id] ) { var s = cells[id]; code.value +="control " + s + " play\n"; } } } code.value +="\n"+"# end of mosaic batch\n";} |
"setup " + s + " input " + streams[s] + "\n"+ | "setup " + s + " input " + sanitize_input( streams[s] ) + "\n"+ | function mosaic_code_update(){ var code = document.getElementById( 'mosaic_code' ); code.value ="##################################\n"+"## HTTP interface mosaic wizard ##\n"+"##################################\n"+"\n"+"# Comment the following line if you don't want to reset your VLM configuration\n"+"del all\n"+"\n"+"# Background options\n"+"new bg broadcast enabled\n"+"setup bg input " + value( 'mosaic_bg_input' ) + "\n"; if( value( 'mosaic_output' ) ) { code.value +="setup bg output " + value( 'mosaic_output' )+ "\n"; } var o = /.*transcode.*/; if(! o.test( value( 'mosaic_output' ) ) ) { code.value +="setup bg option sub-filter=mosaic\n"; } code.value+="\n"+"# Mosaic options\n"+"setup bg option mosaic-alpha=" + mosaic_alpha + "\n"+"setup bg option mosaic-height=" + mosaic_height + "\n"+"setup bg option mosaic-width=" + mosaic_width + "\n"+"setup bg option mosaic-align=" + mosaic_align + "\n"+"setup bg option mosaic-xoffset=" + mosaic_xoffset + "\n"+"setup bg option mosaic-yoffset=" + mosaic_yoffset + "\n"+"setup bg option mosaic-vborder=" + mosaic_vborder + "\n"+"setup bg option mosaic-hborder=" + mosaic_hborder + "\n"+"setup bg option mosaic-position=" + mosaic_position + "\n"+"setup bg option mosaic-rows=" + mosaic_rows + "\n"+"setup bg option mosaic-cols=" + mosaic_cols + "\n"+"setup bg option mosaic-order="; for( y = 0; y < mosaic_rows; y++ ) { for( x = 0; x < mosaic_cols; x++ ) { var id = x+'_'+y; if( cells[id] ) code.value += cells[id]; else code.value += '_'; if( y != mosaic_rows - 1 || x != mosaic_cols - 1 ) code.value += ','; } } code.value += "\n"+"setup bg option mosaic-delay=" + mosaic_delay + "\n"+"setup bg option mosaic-keep-picture\n"+"\n"+"# Input options\n"; var x, y; for( y = 0; y < mosaic_rows; y++ ) { for( x = 0; x < mosaic_cols; x++ ) { var id = x+'_'+y; if( cells[id] ) { var s = cells[id]; code.value +="new " + s + " broadcast enabled\n"+"setup " + s + " input " + streams[s] + "\n"+"setup " + s + " output #duplicate{dst=mosaic-bridge{id=" + s + ",width="+cell_width+",height="+cell_height+"},select=video,dst=bridge-out,select=audio}\n"+"\n"; } } } code.value +="# Launch everything\n"+"control bg play\n"; for( y = 0; y < mosaic_rows; y++ ) { for( x = 0; x < mosaic_cols; x++ ) { var id = x+'_'+y; if( cells[id] ) { var s = cells[id]; code.value +="control " + s + " play\n"; } } } code.value +="\n"+"# end of mosaic batch\n";} |
"# Comment the following line if you don't want to reset you VLM configuration\n"+ | "# Comment the following line if you don't want to reset your VLM configuration\n"+ | function mosaic_code_update(){ var code = document.getElementById( 'mosaic_code' ); code.value ="##################################\n"+"## HTTP interface mosaic wizard ##\n"+"##################################\n"+"\n"+"# Comment the following line if you don't want to reset you VLM configuration\n"+"del all\n"+"\n"+"# Background options\n"+"new bg broadcast enabled\n"+"setup bg input " + value( 'mosaic_bg_input' ) + "\n"; if( value( 'mosaic_output' ) ) { code.value +="setup bg output " + value( 'mosaic_output' )+ "\n"; } var o = /.*transcode.*/; if(! o.test( value( 'mosaic_output' ) ) ) { code.value +="setup bg option sub-filter=mosaic\n"; } code.value+="\n"+"# Mosaic options\n"+"setup bg option mosaic-alpha=" + mosaic_alpha + "\n"+"setup bg option mosaic-height=" + mosaic_height + "\n"+"setup bg option mosaic-width=" + mosaic_width + "\n"+"setup bg option mosaic-align=" + mosaic_align + "\n"+"setup bg option mosaic-xoffset=" + mosaic_xoffset + "\n"+"setup bg option mosaic-yoffset=" + mosaic_yoffset + "\n"+"setup bg option mosaic-vborder=" + mosaic_vborder + "\n"+"setup bg option mosaic-hborder=" + mosaic_hborder + "\n"+"setup bg option mosaic-position=" + mosaic_position + "\n"+"setup bg option mosaic-rows=" + mosaic_rows + "\n"+"setup bg option mosaic-cols=" + mosaic_cols + "\n"+"setup bg option mosaic-order="; for( y = 0; y < mosaic_rows; y++ ) { for( x = 0; x < mosaic_cols; x++ ) { var id = x+'_'+y; if( cells[id] ) code.value += cells[id]; else code.value += '_'; if( y != mosaic_rows - 1 || x != mosaic_cols - 1 ) code.value += ','; } } code.value += "\n"+"setup bg option mosaic-delay=" + mosaic_delay + "\n"+"setup bg option mosaic-keep-picture\n"+"\n"+"# Input options\n"; var x, y; for( y = 0; y < mosaic_rows; y++ ) { for( x = 0; x < mosaic_cols; x++ ) { var id = x+'_'+y; if( cells[id] ) { var s = cells[id]; code.value +="new " + s + " broadcast enabled\n"+"setup " + s + " input " + streams[s] + "\n"+"setup " + s + " output #duplicate{dst=mosaic-bridge{id=" + s + ",width="+cell_width+",height="+cell_height+"},select=video,dst=bridge-out,select=audio}\n"+"\n"; } } } code.value +="# Launch everything\n"+"control bg play\n"; for( y = 0; y < mosaic_rows; y++ ) { for( x = 0; x < mosaic_cols; x++ ) { var id = x+'_'+y; if( cells[id] ) { var s = cells[id]; code.value +="control " + s + " play\n"; } } } code.value +="\n"+"# end of mosaic batch\n";} |
document.getElementById( 'sout_extra' ).value = ",sfilter=mosaic"; | document.getElementById( 'sout_transcode_extra' ).value = ",sfilter=mosaic"; | function mosaic_init(){ document.getElementById( 'sout_extra' ).value = ",sfilter=mosaic"; mosaic_size_change();} |
document.getElementById( 'sout_vcodec_s' ).checked = 'checked'; disable( 'sout_vcodec_s' ); update_sout(); | function mosaic_init(){ document.getElementById( 'sout_extra' ).value = ",sfilter=mosaic"; mosaic_size_change();} |
|
mdt.setAttribute( 'class', 'mosaic_tbl' ); | setclass( mdt, 'mosaic_tbl' ); | function mosaic_size_change(){ var x,y; var bg_width = check_and_replace_int( "bg_width", "400" ); var bg_height = check_and_replace_int( "bg_height", "300" ); mosaic_height = check_and_replace_int( "mosaic_height", "100" ); mosaic_width = check_and_replace_int( "mosaic_width", "100" ); mosaic_xoffset = check_and_replace_int( "mosaic_xoffset", "10" ); mosaic_yoffset = check_and_replace_int( "mosaic_yoffset", "10" ); mosaic_vborder = check_and_replace_int( "mosaic_vborder", "5" ); mosaic_hborder = check_and_replace_int( "mosaic_hborder", "10" ); mosaic_rows = check_and_replace_int( "mosaic_rows", "1" ); mosaic_cols = check_and_replace_int( "mosaic_cols", "1" ); cell_width = Math.floor((mosaic_width-(mosaic_cols-1)*mosaic_hborder)/mosaic_cols); cell_height = Math.floor((mosaic_height-(mosaic_rows-1)*mosaic_vborder)/mosaic_rows); var mlayout = document.getElementById( "mosaic_layout" ); /* TODO: keep 'common' cells when resizing */ while( mlayout.hasChildNodes() ) mlayout.removeChild( mlayout.firstChild ); mlayout.style.width = bg_width + "px"; mlayout.style.height = bg_height + "px"; if( mosaic_cols && mosaic_rows ) { var mdt = document.createElement( 'div' ); mdt.setAttribute( 'id', 'mosaic_dt' ); mdt.setAttribute( 'class', 'mosaic_tbl' ); mdt.style.width = mosaic_width + "px"; mdt.style.height = mosaic_height + "px"; mdt.style.top = mosaic_yoffset + "px"; mdt.style.left = mosaic_xoffset + "px"; var mtable = document.createElement( 'table' ); mtable.setAttribute( 'id', 'mosaic_table' ); mtable.style.top = "-" + mosaic_vborder + "px"; mtable.style.left = "-" + mosaic_hborder + "px"; mtable.style.width = (1*mosaic_width +2*mosaic_hborder) + "px"; mtable.style.height = (1*mosaic_height+2*mosaic_vborder) + "px"; mtable.style.borderSpacing = mosaic_hborder + "px " + mosaic_vborder + "px"; for( y = 0; y < mosaic_rows; y++ ) { var mrow = document.createElement( 'tr' ); for( x = 0; x < mosaic_cols; x++ ) { var mcell = document.createElement( 'td' ); mcell.setAttribute( 'class', 'mosaic_itm' ); mcell.style.width = cell_width + "px"; mcell.style.height = cell_height + "px"; var melt = document.createElement( 'input' ); melt.setAttribute( 'type', 'button' ); var id = x+'_'+y; melt.setAttribute( 'id', id ); melt.setAttribute( 'onclick', 'mosaic_elt_choose(\''+id+'\');' ); if( cells[id] ) melt.setAttribute( 'value', cells[id] ); else melt.setAttribute( 'value', '?' ); melt.setAttribute( 'title', 'Click to choose stream' ); mcell.appendChild( melt ); mrow.appendChild( mcell ); } mtable.appendChild( mrow ); } mdt.appendChild( mtable ); mlayout.appendChild( mdt ); } mosaic_code_update();} |
mcell.setAttribute( 'class', 'mosaic_itm' ); | setclass( mcell, 'mosaic_itm' ); | function mosaic_size_change(){ var x,y; var bg_width = check_and_replace_int( "bg_width", "400" ); var bg_height = check_and_replace_int( "bg_height", "300" ); mosaic_height = check_and_replace_int( "mosaic_height", "100" ); mosaic_width = check_and_replace_int( "mosaic_width", "100" ); mosaic_xoffset = check_and_replace_int( "mosaic_xoffset", "10" ); mosaic_yoffset = check_and_replace_int( "mosaic_yoffset", "10" ); mosaic_vborder = check_and_replace_int( "mosaic_vborder", "5" ); mosaic_hborder = check_and_replace_int( "mosaic_hborder", "10" ); mosaic_rows = check_and_replace_int( "mosaic_rows", "1" ); mosaic_cols = check_and_replace_int( "mosaic_cols", "1" ); cell_width = Math.floor((mosaic_width-(mosaic_cols-1)*mosaic_hborder)/mosaic_cols); cell_height = Math.floor((mosaic_height-(mosaic_rows-1)*mosaic_vborder)/mosaic_rows); var mlayout = document.getElementById( "mosaic_layout" ); /* TODO: keep 'common' cells when resizing */ while( mlayout.hasChildNodes() ) mlayout.removeChild( mlayout.firstChild ); mlayout.style.width = bg_width + "px"; mlayout.style.height = bg_height + "px"; if( mosaic_cols && mosaic_rows ) { var mdt = document.createElement( 'div' ); mdt.setAttribute( 'id', 'mosaic_dt' ); mdt.setAttribute( 'class', 'mosaic_tbl' ); mdt.style.width = mosaic_width + "px"; mdt.style.height = mosaic_height + "px"; mdt.style.top = mosaic_yoffset + "px"; mdt.style.left = mosaic_xoffset + "px"; var mtable = document.createElement( 'table' ); mtable.setAttribute( 'id', 'mosaic_table' ); mtable.style.top = "-" + mosaic_vborder + "px"; mtable.style.left = "-" + mosaic_hborder + "px"; mtable.style.width = (1*mosaic_width +2*mosaic_hborder) + "px"; mtable.style.height = (1*mosaic_height+2*mosaic_vborder) + "px"; mtable.style.borderSpacing = mosaic_hborder + "px " + mosaic_vborder + "px"; for( y = 0; y < mosaic_rows; y++ ) { var mrow = document.createElement( 'tr' ); for( x = 0; x < mosaic_cols; x++ ) { var mcell = document.createElement( 'td' ); mcell.setAttribute( 'class', 'mosaic_itm' ); mcell.style.width = cell_width + "px"; mcell.style.height = cell_height + "px"; var melt = document.createElement( 'input' ); melt.setAttribute( 'type', 'button' ); var id = x+'_'+y; melt.setAttribute( 'id', id ); melt.setAttribute( 'onclick', 'mosaic_elt_choose(\''+id+'\');' ); if( cells[id] ) melt.setAttribute( 'value', cells[id] ); else melt.setAttribute( 'value', '?' ); melt.setAttribute( 'title', 'Click to choose stream' ); mcell.appendChild( melt ); mrow.appendChild( mcell ); } mtable.appendChild( mrow ); } mdt.appendChild( mtable ); mlayout.appendChild( mdt ); } mosaic_code_update();} |
var melt = document.createElement( 'input' ); melt.setAttribute( 'type', 'button' ); | function mosaic_size_change(){ var x,y; var bg_width = check_and_replace_int( "bg_width", "400" ); var bg_height = check_and_replace_int( "bg_height", "300" ); mosaic_height = check_and_replace_int( "mosaic_height", "100" ); mosaic_width = check_and_replace_int( "mosaic_width", "100" ); mosaic_xoffset = check_and_replace_int( "mosaic_xoffset", "10" ); mosaic_yoffset = check_and_replace_int( "mosaic_yoffset", "10" ); mosaic_vborder = check_and_replace_int( "mosaic_vborder", "5" ); mosaic_hborder = check_and_replace_int( "mosaic_hborder", "10" ); mosaic_rows = check_and_replace_int( "mosaic_rows", "1" ); mosaic_cols = check_and_replace_int( "mosaic_cols", "1" ); cell_width = Math.floor((mosaic_width-(mosaic_cols-1)*mosaic_hborder)/mosaic_cols); cell_height = Math.floor((mosaic_height-(mosaic_rows-1)*mosaic_vborder)/mosaic_rows); var mlayout = document.getElementById( "mosaic_layout" ); /* TODO: keep 'common' cells when resizing */ while( mlayout.hasChildNodes() ) mlayout.removeChild( mlayout.firstChild ); mlayout.style.width = bg_width + "px"; mlayout.style.height = bg_height + "px"; if( mosaic_cols && mosaic_rows ) { var mdt = document.createElement( 'div' ); mdt.setAttribute( 'id', 'mosaic_dt' ); mdt.setAttribute( 'class', 'mosaic_tbl' ); mdt.style.width = mosaic_width + "px"; mdt.style.height = mosaic_height + "px"; mdt.style.top = mosaic_yoffset + "px"; mdt.style.left = mosaic_xoffset + "px"; var mtable = document.createElement( 'table' ); mtable.setAttribute( 'id', 'mosaic_table' ); mtable.style.top = "-" + mosaic_vborder + "px"; mtable.style.left = "-" + mosaic_hborder + "px"; mtable.style.width = (1*mosaic_width +2*mosaic_hborder) + "px"; mtable.style.height = (1*mosaic_height+2*mosaic_vborder) + "px"; mtable.style.borderSpacing = mosaic_hborder + "px " + mosaic_vborder + "px"; for( y = 0; y < mosaic_rows; y++ ) { var mrow = document.createElement( 'tr' ); for( x = 0; x < mosaic_cols; x++ ) { var mcell = document.createElement( 'td' ); mcell.setAttribute( 'class', 'mosaic_itm' ); mcell.style.width = cell_width + "px"; mcell.style.height = cell_height + "px"; var melt = document.createElement( 'input' ); melt.setAttribute( 'type', 'button' ); var id = x+'_'+y; melt.setAttribute( 'id', id ); melt.setAttribute( 'onclick', 'mosaic_elt_choose(\''+id+'\');' ); if( cells[id] ) melt.setAttribute( 'value', cells[id] ); else melt.setAttribute( 'value', '?' ); melt.setAttribute( 'title', 'Click to choose stream' ); mcell.appendChild( melt ); mrow.appendChild( mcell ); } mtable.appendChild( mrow ); } mdt.appendChild( mtable ); mlayout.appendChild( mdt ); } mosaic_code_update();} |
|
melt.setAttribute( 'onclick', 'mosaic_elt_choose(\''+id+'\');' ); if( cells[id] ) melt.setAttribute( 'value', cells[id] ); else melt.setAttribute( 'value', '?' ); | function mosaic_size_change(){ var x,y; var bg_width = check_and_replace_int( "bg_width", "400" ); var bg_height = check_and_replace_int( "bg_height", "300" ); mosaic_height = check_and_replace_int( "mosaic_height", "100" ); mosaic_width = check_and_replace_int( "mosaic_width", "100" ); mosaic_xoffset = check_and_replace_int( "mosaic_xoffset", "10" ); mosaic_yoffset = check_and_replace_int( "mosaic_yoffset", "10" ); mosaic_vborder = check_and_replace_int( "mosaic_vborder", "5" ); mosaic_hborder = check_and_replace_int( "mosaic_hborder", "10" ); mosaic_rows = check_and_replace_int( "mosaic_rows", "1" ); mosaic_cols = check_and_replace_int( "mosaic_cols", "1" ); cell_width = Math.floor((mosaic_width-(mosaic_cols-1)*mosaic_hborder)/mosaic_cols); cell_height = Math.floor((mosaic_height-(mosaic_rows-1)*mosaic_vborder)/mosaic_rows); var mlayout = document.getElementById( "mosaic_layout" ); /* TODO: keep 'common' cells when resizing */ while( mlayout.hasChildNodes() ) mlayout.removeChild( mlayout.firstChild ); mlayout.style.width = bg_width + "px"; mlayout.style.height = bg_height + "px"; if( mosaic_cols && mosaic_rows ) { var mdt = document.createElement( 'div' ); mdt.setAttribute( 'id', 'mosaic_dt' ); mdt.setAttribute( 'class', 'mosaic_tbl' ); mdt.style.width = mosaic_width + "px"; mdt.style.height = mosaic_height + "px"; mdt.style.top = mosaic_yoffset + "px"; mdt.style.left = mosaic_xoffset + "px"; var mtable = document.createElement( 'table' ); mtable.setAttribute( 'id', 'mosaic_table' ); mtable.style.top = "-" + mosaic_vborder + "px"; mtable.style.left = "-" + mosaic_hborder + "px"; mtable.style.width = (1*mosaic_width +2*mosaic_hborder) + "px"; mtable.style.height = (1*mosaic_height+2*mosaic_vborder) + "px"; mtable.style.borderSpacing = mosaic_hborder + "px " + mosaic_vborder + "px"; for( y = 0; y < mosaic_rows; y++ ) { var mrow = document.createElement( 'tr' ); for( x = 0; x < mosaic_cols; x++ ) { var mcell = document.createElement( 'td' ); mcell.setAttribute( 'class', 'mosaic_itm' ); mcell.style.width = cell_width + "px"; mcell.style.height = cell_height + "px"; var melt = document.createElement( 'input' ); melt.setAttribute( 'type', 'button' ); var id = x+'_'+y; melt.setAttribute( 'id', id ); melt.setAttribute( 'onclick', 'mosaic_elt_choose(\''+id+'\');' ); if( cells[id] ) melt.setAttribute( 'value', cells[id] ); else melt.setAttribute( 'value', '?' ); melt.setAttribute( 'title', 'Click to choose stream' ); mcell.appendChild( melt ); mrow.appendChild( mcell ); } mtable.appendChild( mrow ); } mdt.appendChild( mtable ); mlayout.appendChild( mdt ); } mosaic_code_update();} |
|
mtable.appendChild( mrow ); | mtbody.appendChild( mrow ); | function mosaic_size_change(){ var x,y; var bg_width = check_and_replace_int( "bg_width", "400" ); var bg_height = check_and_replace_int( "bg_height", "300" ); mosaic_height = check_and_replace_int( "mosaic_height", "100" ); mosaic_width = check_and_replace_int( "mosaic_width", "100" ); mosaic_xoffset = check_and_replace_int( "mosaic_xoffset", "10" ); mosaic_yoffset = check_and_replace_int( "mosaic_yoffset", "10" ); mosaic_vborder = check_and_replace_int( "mosaic_vborder", "5" ); mosaic_hborder = check_and_replace_int( "mosaic_hborder", "10" ); mosaic_rows = check_and_replace_int( "mosaic_rows", "1" ); mosaic_cols = check_and_replace_int( "mosaic_cols", "1" ); cell_width = Math.floor((mosaic_width-(mosaic_cols-1)*mosaic_hborder)/mosaic_cols); cell_height = Math.floor((mosaic_height-(mosaic_rows-1)*mosaic_vborder)/mosaic_rows); var mlayout = document.getElementById( "mosaic_layout" ); /* TODO: keep 'common' cells when resizing */ while( mlayout.hasChildNodes() ) mlayout.removeChild( mlayout.firstChild ); mlayout.style.width = bg_width + "px"; mlayout.style.height = bg_height + "px"; if( mosaic_cols && mosaic_rows ) { var mdt = document.createElement( 'div' ); mdt.setAttribute( 'id', 'mosaic_dt' ); setclass( mdt, 'mosaic_tbl' ); mdt.style.width = mosaic_width + "px"; mdt.style.height = mosaic_height + "px"; mdt.style.top = mosaic_yoffset + "px"; mdt.style.left = mosaic_xoffset + "px"; var mtable = document.createElement( 'table' ); mtable.setAttribute( 'id', 'mosaic_table' ); mtable.style.top = "-" + mosaic_vborder + "px"; mtable.style.left = "-" + mosaic_hborder + "px"; mtable.style.width = (1*mosaic_width +2*mosaic_hborder) + "px"; mtable.style.height = (1*mosaic_height+2*mosaic_vborder) + "px"; mtable.style.borderSpacing = mosaic_hborder + "px " + mosaic_vborder + "px"; for( y = 0; y < mosaic_rows; y++ ) { var mrow = document.createElement( 'tr' ); for( x = 0; x < mosaic_cols; x++ ) { var mcell = document.createElement( 'td' ); setclass( mcell, 'mosaic_itm' ); mcell.style.width = cell_width + "px"; mcell.style.height = cell_height + "px"; var id = x+'_'+y; var melt = create_button( cells[id] ? cells[id] : '?', 'mosaic_elt_choose(\"'+id+'\");' ); melt.setAttribute( 'id', id ); melt.setAttribute( 'title', 'Click to choose stream' ); mcell.appendChild( melt ); mrow.appendChild( mcell ); } mtable.appendChild( mrow ); } mdt.appendChild( mtable ); mlayout.appendChild( mdt ); } mosaic_code_update();} |
mtable.appendChild( mtbody ); | function mosaic_size_change(){ var x,y; var bg_width = check_and_replace_int( "bg_width", "400" ); var bg_height = check_and_replace_int( "bg_height", "300" ); mosaic_height = check_and_replace_int( "mosaic_height", "100" ); mosaic_width = check_and_replace_int( "mosaic_width", "100" ); mosaic_xoffset = check_and_replace_int( "mosaic_xoffset", "10" ); mosaic_yoffset = check_and_replace_int( "mosaic_yoffset", "10" ); mosaic_vborder = check_and_replace_int( "mosaic_vborder", "5" ); mosaic_hborder = check_and_replace_int( "mosaic_hborder", "10" ); mosaic_rows = check_and_replace_int( "mosaic_rows", "1" ); mosaic_cols = check_and_replace_int( "mosaic_cols", "1" ); cell_width = Math.floor((mosaic_width-(mosaic_cols-1)*mosaic_hborder)/mosaic_cols); cell_height = Math.floor((mosaic_height-(mosaic_rows-1)*mosaic_vborder)/mosaic_rows); var mlayout = document.getElementById( "mosaic_layout" ); /* TODO: keep 'common' cells when resizing */ while( mlayout.hasChildNodes() ) mlayout.removeChild( mlayout.firstChild ); mlayout.style.width = bg_width + "px"; mlayout.style.height = bg_height + "px"; if( mosaic_cols && mosaic_rows ) { var mdt = document.createElement( 'div' ); mdt.setAttribute( 'id', 'mosaic_dt' ); setclass( mdt, 'mosaic_tbl' ); mdt.style.width = mosaic_width + "px"; mdt.style.height = mosaic_height + "px"; mdt.style.top = mosaic_yoffset + "px"; mdt.style.left = mosaic_xoffset + "px"; var mtable = document.createElement( 'table' ); mtable.setAttribute( 'id', 'mosaic_table' ); mtable.style.top = "-" + mosaic_vborder + "px"; mtable.style.left = "-" + mosaic_hborder + "px"; mtable.style.width = (1*mosaic_width +2*mosaic_hborder) + "px"; mtable.style.height = (1*mosaic_height+2*mosaic_vborder) + "px"; mtable.style.borderSpacing = mosaic_hborder + "px " + mosaic_vborder + "px"; for( y = 0; y < mosaic_rows; y++ ) { var mrow = document.createElement( 'tr' ); for( x = 0; x < mosaic_cols; x++ ) { var mcell = document.createElement( 'td' ); setclass( mcell, 'mosaic_itm' ); mcell.style.width = cell_width + "px"; mcell.style.height = cell_height + "px"; var id = x+'_'+y; var melt = create_button( cells[id] ? cells[id] : '?', 'mosaic_elt_choose(\"'+id+'\");' ); melt.setAttribute( 'id', id ); melt.setAttribute( 'title', 'Click to choose stream' ); mcell.appendChild( melt ); mrow.appendChild( mcell ); } mtable.appendChild( mrow ); } mdt.appendChild( mtable ); mlayout.appendChild( mdt ); } mosaic_code_update();} |
|
HTMLImageElement.prototype.mousedown = function() { var evt = this.ownerDocument.createEvent('MouseEvents'); evt.initMouseEvent('mousedown', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null); this.dispatchEvent(evt); } | windowObject.HTMLImageElement.prototype.mousedown = function() { var evt = this.ownerDocument.createEvent('MouseEvents'); evt.initMouseEvent('mousedown', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null); this.dispatchEvent(evt); } | HTMLImageElement.prototype.mousedown = function() { var evt = this.ownerDocument.createEvent('MouseEvents'); evt.initMouseEvent('mousedown', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null); this.dispatchEvent(evt); } |
while (target != div && target != document.documentElement) { | while (target != div && target != null) { | OpenLayers.Util.mouseLeft = function (evt, div) { // start with the element to which the mouse has moved var target = (evt.relatedTarget) ? evt.relatedTarget : evt.toElement; // walk up the DOM tree. while (target != div && target != document.documentElement) { target = target.parentNode; } // if the target we stop at isn't the div, then we've left the div. return (target != div);}; |
if( e == undefined ) e = window.event; | var mousemove = function( e ) { if( e == undefined ) e = window.event; hop_vpaned_mousemove( e, paned ); }; |
|
var w = w0 + (x0 - hop_mouse_y( event )); | var w = w0 + (x0 - hop_event_mouse_y( event )); | mousemove = function( event ) { var w = w0 + (x0 - hop_mouse_y( event )); hop_style_set( win ,"left", (l0 + w0) - w ); hop_style_set( win.el_main, "width", w ); hop_style_set( win.el_main, "height", h0 + (hop_mouse_y( event ) - y0) ); } |
hop_style_set( win.el_main, "height", h0 + (hop_mouse_y( event ) - y0) ); | hop_style_set( win.el_main, "height", h0 + (hop_event_mouse_y( event ) - y0) ); | mousemove = function( event ) { var w = w0 + (x0 - hop_mouse_y( event )); hop_style_set( win ,"left", (l0 + w0) - w ); hop_style_set( win.el_main, "width", w ); hop_style_set( win.el_main, "height", h0 + (hop_mouse_y( event ) - y0) ); } |
if( e == undefined ) e = window.event; | var mousemove = function( e ) { hop_vpaned_mousemove( e, paned ); }; |
|
var w = w0 + (x0 - event.clientX); win.style.left = (l0 + w0) - w; win.el_main.style.width = w; win.el_main.style.height = h0 + (event.clientY - y0); | var w = w0 + (x0 - hop_mouse_y( event )); hop_style_set( win ,"left", (l0 + w0) - w ); hop_style_set( win.el_main, "width", w ); hop_style_set( win.el_main, "height", h0 + (hop_mouse_y( event ) - y0) ); | mousemove = function( event ) { var w = w0 + (x0 - event.clientX); win.style.left = (l0 + w0) - w; win.el_main.style.width = w; win.el_main.style.height = h0 + (event.clientY - y0); } |
sourcesDocument.body.style.cursor = "default"; | function moveBreakPoint(event){ if (hasStyleClass(event.target.parentNode, "breakpoint")) { files[currentFile].breakpoints[parseInt(event.target.title)] = 0; draggingBreakpoint = event.target; draggingBreakpoint.started = false; draggingBreakpoint.dragLastY = event.clientY + window.scrollY; draggingBreakpoint.dragLastX = event.clientX + window.scrollX; var sourcesDocument = document.getElementById("sources").contentDocument; sourcesDocument.addEventListener("mousemove", breakpointDrag, true); sourcesDocument.addEventListener("mouseup", breakpointDragEnd, true); }} |
|
if (hasStyleClass(event.target.parentNode, "breakpoint")) { | if (event.target.parentNode.hasStyleClass("breakpoint")) { | function moveBreakPoint(event){ if (hasStyleClass(event.target.parentNode, "breakpoint")) { draggingBreakpoint = event.target; draggingBreakpoint.started = false; draggingBreakpoint.dragLastY = event.clientY + window.scrollY; draggingBreakpoint.dragLastX = event.clientX + window.scrollX; var sourcesDocument = document.getElementById("sources").contentDocument; sourcesDocument.addEventListener("mousemove", breakpointDrag, true); sourcesDocument.addEventListener("mouseup", breakpointDragEnd, true); sourcesDocument.body.style.cursor = "default"; }} |
files[currentFile].breakpoints[parseInt(event.target.title)] = 0; | function moveBreakPoint(event){ if (hasStyleClass(event.target.parentNode, "breakpoint")) { files[currentFile].breakpoints[parseInt(event.target.title)] = 0; draggingBreakpoint = event.target; draggingBreakpoint.started = false; draggingBreakpoint.dragLastY = event.clientY + window.scrollY; draggingBreakpoint.dragLastX = event.clientX + window.scrollX; var sourcesDocument = document.getElementById("sources").contentDocument; sourcesDocument.addEventListener("mousemove", breakpointDrag, true); sourcesDocument.addEventListener("mouseup", breakpointDragEnd, true); sourcesDocument.body.style.cursor = "default"; }} |
|
function moveHandler(e) {if (!e) e = window.event; | function moveHandler(scwEvt) { if (!scwEvt) scwEvt = window.event; | function moveHandler(e) {if (!e) e = window.event; elementToDrag.style.left = (e.clientX - deltaX) + 'px'; elementToDrag.style.top = (e.clientY - deltaY) + 'px'; if (document.getElementById('scwIframe')) {document.getElementById('scwIframe').style.left = (e.clientX - deltaX) + 'px'; document.getElementById('scwIframe').style.top = (e.clientY - deltaY) + 'px'; } scwStopPropagation(e); } |
elementToDrag.style.left = (e.clientX - deltaX) + 'px'; elementToDrag.style.top = (e.clientY - deltaY) + 'px'; | elementToDrag.style.left = (scwEvt.clientX - deltaX) + 'px'; elementToDrag.style.top = (scwEvt.clientY - deltaY) + 'px'; | function moveHandler(e) {if (!e) e = window.event; elementToDrag.style.left = (e.clientX - deltaX) + 'px'; elementToDrag.style.top = (e.clientY - deltaY) + 'px'; if (document.getElementById('scwIframe')) {document.getElementById('scwIframe').style.left = (e.clientX - deltaX) + 'px'; document.getElementById('scwIframe').style.top = (e.clientY - deltaY) + 'px'; } scwStopPropagation(e); } |
if (document.getElementById('scwIframe')) {document.getElementById('scwIframe').style.left = (e.clientX - deltaX) + 'px'; document.getElementById('scwIframe').style.top = (e.clientY - deltaY) + 'px'; } | if (scwID('scwIframe')) { scwID('scwIframe').style.left = (scwEvt.clientX - deltaX) + 'px'; scwID('scwIframe').style.top = (scwEvt.clientY - deltaY) + 'px'; } | function moveHandler(e) {if (!e) e = window.event; elementToDrag.style.left = (e.clientX - deltaX) + 'px'; elementToDrag.style.top = (e.clientY - deltaY) + 'px'; if (document.getElementById('scwIframe')) {document.getElementById('scwIframe').style.left = (e.clientX - deltaX) + 'px'; document.getElementById('scwIframe').style.top = (e.clientY - deltaY) + 'px'; } scwStopPropagation(e); } |
scwStopPropagation(e); } | scwStopPropagation(scwEvt); } | function moveHandler(e) {if (!e) e = window.event; elementToDrag.style.left = (e.clientX - deltaX) + 'px'; elementToDrag.style.top = (e.clientY - deltaY) + 'px'; if (document.getElementById('scwIframe')) {document.getElementById('scwIframe').style.left = (e.clientX - deltaX) + 'px'; document.getElementById('scwIframe').style.top = (e.clientY - deltaY) + 'px'; } scwStopPropagation(e); } |
} else if ( bounds.top > this.getGridBounds().bottom || bounds.left > this.getGridBounds().right || bounds.right < this.getGridBounds().left || bounds.bottom < this.getGridBounds().top ) { | } else if ( bounds.top < gridBounds.bottom || bounds.left > gridBounds.right || bounds.right < gridBounds.left || bounds.bottom > gridBounds.top ) { console.log("else if"); | moveTo:function(bounds,zoomChanged) { if (!this.getVisibility()) { if (zoomChanged) { this.grid = null; } return; } if (!this.grid || zoomChanged) { this._initTiles(); } else if ( bounds.top > this.getGridBounds().bottom || bounds.left > this.getGridBounds().right || bounds.right < this.getGridBounds().left || bounds.bottom < this.getGridBounds().top ) { this._initTiles(); } else { var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false); } while (this.getGridBounds().left > bounds.left) { this.insertColumn(true); } while (this.getGridBounds().top < bounds.top) { this.insertRow(true); } while (this.getGridBounds().right < bounds.right) { this.insertColumn(false); } } }, |
while (this.getGridBounds().bottom > bounds.bottom) { | while (gridBounds.bottom > bounds.bottom) { | moveTo:function(bounds,zoomChanged) { if (!this.getVisibility()) { if (zoomChanged) { this.grid = null; } return; } if (!this.grid || zoomChanged) { this._initTiles(); } else if ( bounds.top > this.getGridBounds().bottom || bounds.left > this.getGridBounds().right || bounds.right < this.getGridBounds().left || bounds.bottom < this.getGridBounds().top ) { this._initTiles(); } else { var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false); } while (this.getGridBounds().left > bounds.left) { this.insertColumn(true); } while (this.getGridBounds().top < bounds.top) { this.insertRow(true); } while (this.getGridBounds().right < bounds.right) { this.insertColumn(false); } } }, |
while (this.getGridBounds().left > bounds.left) { | while (gridBounds.left > bounds.left) { | moveTo:function(bounds,zoomChanged) { if (!this.getVisibility()) { if (zoomChanged) { this.grid = null; } return; } if (!this.grid || zoomChanged) { this._initTiles(); } else if ( bounds.top > this.getGridBounds().bottom || bounds.left > this.getGridBounds().right || bounds.right < this.getGridBounds().left || bounds.bottom < this.getGridBounds().top ) { this._initTiles(); } else { var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false); } while (this.getGridBounds().left > bounds.left) { this.insertColumn(true); } while (this.getGridBounds().top < bounds.top) { this.insertRow(true); } while (this.getGridBounds().right < bounds.right) { this.insertColumn(false); } } }, |
while (this.getGridBounds().top < bounds.top) { | while (gridBounds.top < bounds.top) { | moveTo:function(bounds,zoomChanged) { if (!this.getVisibility()) { if (zoomChanged) { this.grid = null; } return; } if (!this.grid || zoomChanged) { this._initTiles(); } else if ( bounds.top > this.getGridBounds().bottom || bounds.left > this.getGridBounds().right || bounds.right < this.getGridBounds().left || bounds.bottom < this.getGridBounds().top ) { this._initTiles(); } else { var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false); } while (this.getGridBounds().left > bounds.left) { this.insertColumn(true); } while (this.getGridBounds().top < bounds.top) { this.insertRow(true); } while (this.getGridBounds().right < bounds.right) { this.insertColumn(false); } } }, |
while (this.getGridBounds().right < bounds.right) { | while (gridBounds.right < bounds.right) { | moveTo:function(bounds,zoomChanged) { if (!this.getVisibility()) { if (zoomChanged) { this.grid = null; } return; } if (!this.grid || zoomChanged) { this._initTiles(); } else if ( bounds.top > this.getGridBounds().bottom || bounds.left > this.getGridBounds().right || bounds.right < this.getGridBounds().left || bounds.bottom < this.getGridBounds().top ) { this._initTiles(); } else { var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false); } while (this.getGridBounds().left > bounds.left) { this.insertColumn(true); } while (this.getGridBounds().top < bounds.top) { this.insertRow(true); } while (this.getGridBounds().right < bounds.right) { this.insertColumn(false); } } }, |
if (tlViewPort.x > -this.tileSize.w * (this.buffer - 1)) { | if (tlViewPort.x > -this.tileSize.w * (buffer - 1)) { | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this, arguments); if (bounds == null) { bounds = this.map.getExtent(); } if (bounds != null) { if (!this.grid.length || zoomChanged || !this.getGridBounds().containsBounds(bounds, true)) { this._initTiles(); } else { while (true) { var tlLayer = this.grid[0][0].position; var tlViewPort = this.map.getViewPortPxFromLayerPx(tlLayer); if (tlViewPort.x > -this.tileSize.w * (this.buffer - 1)) { this.shiftColumn(true); } else if (tlViewPort.x < -this.tileSize.w * this.buffer) { this.shiftColumn(false); } else if (tlViewPort.y > -this.tileSize.h * (this.buffer - 1)) { this.shiftRow(true); } else if (tlViewPort.y < -this.tileSize.h * this.buffer) { this.shiftRow(false); } else { break; } } } } }, |
} else if (tlViewPort.x < -this.tileSize.w * this.buffer) { | } else if (tlViewPort.x < -this.tileSize.w * buffer) { | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this, arguments); if (bounds == null) { bounds = this.map.getExtent(); } if (bounds != null) { if (!this.grid.length || zoomChanged || !this.getGridBounds().containsBounds(bounds, true)) { this._initTiles(); } else { while (true) { var tlLayer = this.grid[0][0].position; var tlViewPort = this.map.getViewPortPxFromLayerPx(tlLayer); if (tlViewPort.x > -this.tileSize.w * (this.buffer - 1)) { this.shiftColumn(true); } else if (tlViewPort.x < -this.tileSize.w * this.buffer) { this.shiftColumn(false); } else if (tlViewPort.y > -this.tileSize.h * (this.buffer - 1)) { this.shiftRow(true); } else if (tlViewPort.y < -this.tileSize.h * this.buffer) { this.shiftRow(false); } else { break; } } } } }, |
} else if (tlViewPort.y > -this.tileSize.h * (this.buffer - 1)) { | } else if (tlViewPort.y > -this.tileSize.h * (buffer - 1)) { | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this, arguments); if (bounds == null) { bounds = this.map.getExtent(); } if (bounds != null) { if (!this.grid.length || zoomChanged || !this.getGridBounds().containsBounds(bounds, true)) { this._initTiles(); } else { while (true) { var tlLayer = this.grid[0][0].position; var tlViewPort = this.map.getViewPortPxFromLayerPx(tlLayer); if (tlViewPort.x > -this.tileSize.w * (this.buffer - 1)) { this.shiftColumn(true); } else if (tlViewPort.x < -this.tileSize.w * this.buffer) { this.shiftColumn(false); } else if (tlViewPort.y > -this.tileSize.h * (this.buffer - 1)) { this.shiftRow(true); } else if (tlViewPort.y < -this.tileSize.h * this.buffer) { this.shiftRow(false); } else { break; } } } } }, |
} else if (tlViewPort.y < -this.tileSize.h * this.buffer) { | } else if (tlViewPort.y < -this.tileSize.h * buffer) { | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this, arguments); if (bounds == null) { bounds = this.map.getExtent(); } if (bounds != null) { if (!this.grid.length || zoomChanged || !this.getGridBounds().containsBounds(bounds, true)) { this._initTiles(); } else { while (true) { var tlLayer = this.grid[0][0].position; var tlViewPort = this.map.getViewPortPxFromLayerPx(tlLayer); if (tlViewPort.x > -this.tileSize.w * (this.buffer - 1)) { this.shiftColumn(true); } else if (tlViewPort.x < -this.tileSize.w * this.buffer) { this.shiftColumn(false); } else if (tlViewPort.y > -this.tileSize.h * (this.buffer - 1)) { this.shiftRow(true); } else if (tlViewPort.y < -this.tileSize.h * this.buffer) { this.shiftRow(false); } else { break; } } } } }, |
} }; if (this.buffer == 0) { for (var r=0, rl=this.grid.length; r<rl; r++) { var row = this.grid[r]; for (var c=0, cl=row.length; c<cl; c++) { var tile = row[c]; if (!tile.drawn && tile.bounds.intersectsBounds(bounds, false)) { tile.draw(); } } | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this, arguments); if (bounds == null) { bounds = this.map.getExtent(); } if (bounds != null) { if (!this.grid.length || zoomChanged || !this.getGridBounds().containsBounds(bounds, true)) { this._initTiles(); } else { while (true) { var tlLayer = this.grid[0][0].position; var tlViewPort = this.map.getViewPortPxFromLayerPx(tlLayer); if (tlViewPort.x > -this.tileSize.w * (this.buffer - 1)) { this.shiftColumn(true); } else if (tlViewPort.x < -this.tileSize.w * this.buffer) { this.shiftColumn(false); } else if (tlViewPort.y > -this.tileSize.h * (this.buffer - 1)) { this.shiftRow(true); } else if (tlViewPort.y < -this.tileSize.h * this.buffer) { this.shiftRow(false); } else { break; } } } } }, |
|
} else { | } else if ( bounds.top > this.getGridBounds().bottom || bounds.left > this.getGridBounds().right || bounds.right < this.getGridBounds().left || bounds.bottom < this.getGridBounds().top ) { this._initTiles(); } else { | moveTo:function(bounds,zoomChanged) { if (!this.getVisibility()) { if (zoomChanged) { this.grid = null; } return; } if (!this.grid || zoomChanged) { this._initTiles(); } else { var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false); } while (this.getGridBounds().left > bounds.left) { this.insertColumn(true); } while (this.getGridBounds().top < bounds.top) { this.insertRow(true); } while (this.getGridBounds().right < bounds.right) { this.insertColumn(false); } } }, |
var gCenter = this.getYMapCenter(); | var yCenter = this.getYMapCenter(); | moveTo:function(bounds,zoomChanged) { if ((this.ymap != null) && (!this.dragging)) { var olCenter = this.map.getCenter(); var gCenter = this.getYMapCenter(); var olZoom = this.map.getZoom(); var gZoom = this.ymap.getZoomLevel(); if ((!olCenter.equals(yCenter)) || ((olZoom +1) != yZoom)) { this.ymap.drawZoomAndCenter(new YGeoPoint(olCenter.lat, olCenter.lon), olZoom + 1); } } }, |
var gZoom = this.ymap.getZoomLevel(); | var yZoom = this.ymap.getZoomLevel(); | moveTo:function(bounds,zoomChanged) { if ((this.ymap != null) && (!this.dragging)) { var olCenter = this.map.getCenter(); var gCenter = this.getYMapCenter(); var olZoom = this.map.getZoom(); var gZoom = this.ymap.getZoomLevel(); if ((!olCenter.equals(yCenter)) || ((olZoom +1) != yZoom)) { this.ymap.drawZoomAndCenter(new YGeoPoint(olCenter.lat, olCenter.lon), olZoom + 1); } } }, |
if ((!olCenter.equals(yCenter)) || ((olZoom +1) != yZoom)) { | if ((!olCenter.equals(yCenter)) || (( 16 - olZoom) != yZoom)) { | moveTo:function(bounds,zoomChanged) { if ((this.ymap != null) && (!this.dragging)) { var olCenter = this.map.getCenter(); var gCenter = this.getYMapCenter(); var olZoom = this.map.getZoom(); var gZoom = this.ymap.getZoomLevel(); if ((!olCenter.equals(yCenter)) || ((olZoom +1) != yZoom)) { this.ymap.drawZoomAndCenter(new YGeoPoint(olCenter.lat, olCenter.lon), olZoom + 1); } } }, |
olZoom + 1); | 16 - olZoom); | moveTo:function(bounds,zoomChanged) { if ((this.ymap != null) && (!this.dragging)) { var olCenter = this.map.getCenter(); var gCenter = this.getYMapCenter(); var olZoom = this.map.getZoom(); var gZoom = this.ymap.getZoomLevel(); if ((!olCenter.equals(yCenter)) || ((olZoom +1) != yZoom)) { this.ymap.drawZoomAndCenter(new YGeoPoint(olCenter.lat, olCenter.lon), olZoom + 1); } } }, |
OpenLayers.Util.clearArray(this); | this.clear(); | moveTo: function (bounds, position, redraw) { if (redraw == null) { redraw = true; } OpenLayers.Util.clearArray(this); this.bounds = bounds.clone(); this.position = position.clone(); if (redraw) { this.draw(); } }, |
} var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false); } while (this.getGridBounds().left > bounds.left) { this.insertColumn(true); } while (this.getGridBounds().top < bounds.top) { this.insertRow(true); } while (this.getGridBounds().right < bounds.right) { this.insertColumn(false); | } else { var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false); } while (this.getGridBounds().left > bounds.left) { this.insertColumn(true); } while (this.getGridBounds().top < bounds.top) { this.insertRow(true); } while (this.getGridBounds().right < bounds.right) { this.insertColumn(false); } | moveTo:function(bounds,zoomChanged) { if (!this.getVisibility()) { if (zoomChanged) { this.grid = null; } return; } if (!this.grid || zoomChanged) { this._initTiles(); } var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false); } while (this.getGridBounds().left > bounds.left) { this.insertColumn(true); } while (this.getGridBounds().top < bounds.top) { this.insertRow(true); } while (this.getGridBounds().right < bounds.right) { this.insertColumn(false); } }, |
new OpenLayers.Bounds(center.lon - bounds.getWidth(), center.lat - bounds.getHeight(), center.lon + bounds.getWidth(), center.lat + bounds.getHeight()); | new OpenLayers.Bounds(center.lon - (tileWidth / 2), center.lat - (tileHeight / 2), center.lon + (tileWidth / 2), center.lat + (tileHeight / 2)); | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments); if (bounds == null) { bounds = this.map.getExtent(); } var firstRendering = (this.tile == null); //does the new bounds to which we need to move fall outside of the // current tile's bounds? var outOfBounds = (!firstRendering && !this.tile.bounds.containsBounds(bounds)); if ( zoomChanged || firstRendering || (!dragging && outOfBounds) ) { //clear out the old tile if (this.tile) { OpenLayers.Util.clearArray(this.tile); } //determine new tile bounds var center = bounds.getCenterLonLat(); var tileBounds = new OpenLayers.Bounds(center.lon - bounds.getWidth(), center.lat - bounds.getHeight(), center.lon + bounds.getWidth(), center.lat + bounds.getHeight()); //determine new tile size var tileSize = this.map.getSize(); tileSize.w = tileSize.w * 2; tileSize.h = tileSize.h * 2; //formulate request url string var url = this.getURL(tileBounds); //determine new position (upper left corner of new bounds) var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); var pos = this.map.getLayerPxFromLonLat(ul); if (!this.tile) { this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, url, tileSize); this.tile.draw(); } else { this.tile.moveTo(tileBounds, pos); } } }, |
tileSize.w = tileSize.w * 2; tileSize.h = tileSize.h * 2; | tileSize.w = tileSize.w * this.ratio; tileSize.h = tileSize.h * this.ratio; | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments); if (bounds == null) { bounds = this.map.getExtent(); } var firstRendering = (this.tile == null); //does the new bounds to which we need to move fall outside of the // current tile's bounds? var outOfBounds = (!firstRendering && !this.tile.bounds.containsBounds(bounds)); if ( zoomChanged || firstRendering || (!dragging && outOfBounds) ) { //clear out the old tile if (this.tile) { OpenLayers.Util.clearArray(this.tile); } //determine new tile bounds var center = bounds.getCenterLonLat(); var tileBounds = new OpenLayers.Bounds(center.lon - bounds.getWidth(), center.lat - bounds.getHeight(), center.lon + bounds.getWidth(), center.lat + bounds.getHeight()); //determine new tile size var tileSize = this.map.getSize(); tileSize.w = tileSize.w * 2; tileSize.h = tileSize.h * 2; //formulate request url string var url = this.getURL(tileBounds); //determine new position (upper left corner of new bounds) var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); var pos = this.map.getLayerPxFromLonLat(ul); if (!this.tile) { this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, url, tileSize); this.tile.draw(); } else { this.tile.moveTo(tileBounds, pos); } } }, |
OpenLayers.Util.clearArray(this.tile); | this.tile.clear(); | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments); if (bounds == null) { bounds = this.map.getExtent(); } var firstRendering = (this.tile == null); //does the new bounds to which we need to move fall outside of the // current tile's bounds? var outOfBounds = (!firstRendering && !this.tile.bounds.containsBounds(bounds)); if ( zoomChanged || firstRendering || (!dragging && outOfBounds) ) { //clear out the old tile if (this.tile) { OpenLayers.Util.clearArray(this.tile); } //determine new tile bounds var center = bounds.getCenterLonLat(); var tileWidth = bounds.getWidth() * this.ratio; var tileHeight = bounds.getHeight() * this.ratio; var tileBounds = new OpenLayers.Bounds(center.lon - (tileWidth / 2), center.lat - (tileHeight / 2), center.lon + (tileWidth / 2), center.lat + (tileHeight / 2)); //determine new tile size var tileSize = this.map.getSize(); tileSize.w = tileSize.w * this.ratio; tileSize.h = tileSize.h * this.ratio; //formulate request url string var url = this.getURL(tileBounds); //determine new position (upper left corner of new bounds) var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); var pos = this.map.getLayerPxFromLonLat(ul); if ( this.tile && !this.tile.size.equals(tileSize)) { this.tile.destroy(); this.tile = null; } if (!this.tile) { this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, url, tileSize); this.tile.draw(); } else { this.tile.moveTo(tileBounds, pos); } } }, |
} else if (tlViewPort.y > -this.tileSize.w * (this.buffer - 1)) { | } else if (tlViewPort.y > -this.tileSize.h * (this.buffer - 1)) { | moveTo:function(bounds, zoomChanged, dragging) { if (bounds == null) { bounds = this.map.getExtent(); } if (bounds != null) { if (!this.getVisibility()) { if (zoomChanged) { this.clearGrid(); } } else if (!this.grid.length || zoomChanged || !this.getGridBounds().containsBounds(bounds, true)) { this._initTiles(); } else { while (true) { var tlLayer = this.grid[0][0].position; var tlViewPort = this.map.getViewPortPxFromLayerPx(tlLayer); if (tlViewPort.x > -this.tileSize.w * (this.buffer - 1)) { this.shiftColumn(true); } else if (tlViewPort.x < -this.tileSize.w * this.buffer) { this.shiftColumn(false); } else if (tlViewPort.y > -this.tileSize.w * (this.buffer - 1)) { this.shiftRow(true); } else if (tlViewPort.y < -this.tileSize.h * this.buffer) { this.shiftRow(false); } else { break; } } } } }, |
if (this.type != null) { this.vemap.SetMapStyle(this.type); this.type = null; } | moveTo:function(bounds, zoomChanged, minor) { if (this.vemap != null) { var olCenter = this.map.getCenter(); var veCenter = this.getVELatLongFromOLLonLat(olCenter); if (zoomChanged) { var olZoom = this.map.getZoom(); var veZoom = this.getVEZoomFromOLZoom(olZoom); this.vemap.SetCenterAndZoom(veCenter, veZoom); } else { this.vemap.PanToLatLong(veCenter); } } }, |
|
if (this.type != null) { this.gmap.setMapType(this.type); this.type = null; } this.dontListen = false; | moveTo:function(bounds, zoomChanged, minor) { if ((this.gmap != null) && (!this.dragging)) { var newCenter = this.map.getCenter(); var newZoom = this.map.getZoom(); if (newCenter != null) { var gCenter = this.gmap.getCenter(); var gZoom = this.gmap.getZoom(); var currentCenter = this.getOLLonLatFromGLatLng(gCenter); var currentZoom = this.getOLZoomFromGZoom(gZoom); if ( (!newCenter.equals(currentCenter)) || (newZoom != currentZoom) ) { this.gmap.setCenter(this.getGLatLngFromOLLonLat(newCenter), this.getGZoomFromOLZoom(newZoom)); } } } }, |
|
bounds = this.map.getBounds(); | bounds = this.map.getExtent(); | moveTo:function(bounds, zoomChanged, minor) { if (bounds == null) { bounds = this.map.getBounds(); } if (bounds != null) { if (!this.getVisibility()) { if (zoomChanged) { //now clear out the old grid and start a new one this.clearGrid(); this.grid = null; } } else { if (!this.grid || zoomChanged) { this._initTiles(); } else if (this.getGridBounds().containsBounds(bounds, true) == false) { this._initTiles(); } else { var i = 0; while (this.getGridBounds().bottom > bounds.bottom) { this.insertRow(false); } while (this.getGridBounds().left > bounds.left) { this.insertColumn(true); } while (this.getGridBounds().top < bounds.top) { this.insertRow(true); } while (this.getGridBounds().right < bounds.right) { this.insertColumn(false); } } } } }, |
if(this.tile) { this.tile.destroy(); this.tile = null; } var tileBounds = this.extent.clone(); | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.prototype.moveTo.apply(this, arguments); var firstRendering = (this.tile == null); if(zoomChanged || firstRendering) { //clear out the old tile if(this.tile) { this.tile.destroy(); this.tile = null; } //determine new tile bounds var tileBounds = this.extent.clone(); //determine new tile size var tileWidth = this.extent.getWidth() / this.map.getResolution(); var tileHeight = this.extent.getHeight() / (this.map.getResolution() * this.aspectRatio); var tileSize = new OpenLayers.Size(tileWidth, tileHeight); //determine new position (upper left corner of new bounds) var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); var pos = this.map.getLayerPxFromLonLat(ul); this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, this.url, tileSize); this.tile.draw(); } }, |
|
var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); var pos = this.map.getLayerPxFromLonLat(ul); | var ul = new OpenLayers.LonLat(this.extent.left, this.extent.top); var ulPx = this.map.getLayerPxFromLonLat(ul); | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.prototype.moveTo.apply(this, arguments); var firstRendering = (this.tile == null); if(zoomChanged || firstRendering) { //clear out the old tile if(this.tile) { this.tile.destroy(); this.tile = null; } //determine new tile bounds var tileBounds = this.extent.clone(); //determine new tile size var tileWidth = this.extent.getWidth() / this.map.getResolution(); var tileHeight = this.extent.getHeight() / (this.map.getResolution() * this.aspectRatio); var tileSize = new OpenLayers.Size(tileWidth, tileHeight); //determine new position (upper left corner of new bounds) var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); var pos = this.map.getLayerPxFromLonLat(ul); this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, this.url, tileSize); this.tile.draw(); } }, |
this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, this.url, tileSize); | if(firstRendering) { this.tile = new OpenLayers.Tile.Image(this, ulPx, this.extent, this.url, tileSize); } else { this.tile.size = tileSize.clone(); this.tile.position = ulPx.clone(); } | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.prototype.moveTo.apply(this, arguments); var firstRendering = (this.tile == null); if(zoomChanged || firstRendering) { //clear out the old tile if(this.tile) { this.tile.destroy(); this.tile = null; } //determine new tile bounds var tileBounds = this.extent.clone(); //determine new tile size var tileWidth = this.extent.getWidth() / this.map.getResolution(); var tileHeight = this.extent.getHeight() / (this.map.getResolution() * this.aspectRatio); var tileSize = new OpenLayers.Size(tileWidth, tileHeight); //determine new position (upper left corner of new bounds) var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); var pos = this.map.getLayerPxFromLonLat(ul); this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, this.url, tileSize); this.tile.draw(); } }, |
if ((this.px != null) && (this.imageDiv != null)) { if (this.calculateOffset) { this.offset = this.calculateOffset(this.size); | if (this.imageDiv != null) { if (this.px == null) { this.display(false); } else { if (this.calculateOffset) { this.offset = this.calculateOffset(this.size); } var offsetPx = this.px.offset(this.offset); OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, offsetPx); this.display(true); | moveTo: function (px) { //if no px passed in, use stored location if (px != null) { this.px = px; } if ((this.px != null) && (this.imageDiv != null)) { if (this.calculateOffset) { this.offset = this.calculateOffset(this.size); } var offsetPx = this.px.offset(this.offset); OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, offsetPx); } }, |
var offsetPx = this.px.offset(this.offset); OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, offsetPx); | moveTo: function (px) { //if no px passed in, use stored location if (px != null) { this.px = px; } if ((this.px != null) && (this.imageDiv != null)) { if (this.calculateOffset) { this.offset = this.calculateOffset(this.size); } var offsetPx = this.px.offset(this.offset); OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, offsetPx); } }, |
|
if ( this.tile && !this.tile.size.equals(tileSize)) { this.tile.destroy(); this.tile = null; } | moveTo:function(bounds, zoomChanged, dragging) { OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments); if (bounds == null) { bounds = this.map.getExtent(); } var firstRendering = (this.tile == null); //does the new bounds to which we need to move fall outside of the // current tile's bounds? var outOfBounds = (!firstRendering && !this.tile.bounds.containsBounds(bounds)); if ( zoomChanged || firstRendering || (!dragging && outOfBounds) ) { //clear out the old tile if (this.tile) { OpenLayers.Util.clearArray(this.tile); } //determine new tile bounds var center = bounds.getCenterLonLat(); var tileWidth = bounds.getWidth() * this.ratio; var tileHeight = bounds.getHeight() * this.ratio; var tileBounds = new OpenLayers.Bounds(center.lon - (tileWidth / 2), center.lat - (tileHeight / 2), center.lon + (tileWidth / 2), center.lat + (tileHeight / 2)); //determine new tile size var tileSize = this.map.getSize(); tileSize.w = tileSize.w * this.ratio; tileSize.h = tileSize.h * this.ratio; //formulate request url string var url = this.getURL(tileBounds); //determine new position (upper left corner of new bounds) var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); var pos = this.map.getLayerPxFromLonLat(ul); if (!this.tile) { this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, url, tileSize); this.tile.draw(); } else { this.tile.moveTo(tileBounds, pos); } } }, |
|
if ((px != null) && (this.image != null)) { offsetPx = px.offset(this.offset); this.image.style.left = offsetPx.x + "px"; this.image.style.top = offsetPx.y + "px" | if (px != null) { this.px = px; } if ((this.px != null) && (this.imageDiv != null)) { if (this.calculateOffset) { this.offset = this.calculateOffset(this.size); } var offsetPx = this.px.offset(this.offset); OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, offsetPx); | moveTo: function (px) { if ((px != null) && (this.image != null)) { offsetPx = px.offset(this.offset); this.image.style.left = offsetPx.x + "px"; this.image.style.top = offsetPx.y + "px" } }, |
var rng, nl, i; | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
|
sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); | sel.setBaseAndExtent(bookmark.rng.startContainer, bookmark.rng.startOffset, bookmark.rng.endContainer, bookmark.rng.endOffset); | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
if (tinyMCE.isMSIE) { | if (tinyMCE.isRealIE) { | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
bookmark.rng.select(); | try { bookmark.rng.select(); } catch (ex) { } | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
rng = inst.getBody().createControlRange(); | rng = b.createControlRange(); | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
nl = doc.getElementsByTagName(bookmark.tag); | nl = b.getElementsByTagName(bookmark.tag); | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); | try { if (bookmark.start < 0) return true; rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } catch (ex) { return true; } | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } | if (tinyMCE.isGecko || tinyMCE.isOpera) { if (bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); } | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
if (tinyMCE.isGecko) { rng = doc.createRange(); | if (bookmark.start != -1 && bookmark.end != -1) { try { sd = this._getTextPos(b, bookmark.start, bookmark.end); rng = doc.createRange(); rng.setStart(sd.startNode, sd.startOffset); rng.setEnd(sd.endNode, sd.endOffset); sel.removeAllRanges(); sel.addRange(rng); win.focus(); } catch (ex) { } } | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); | /* if (typeof(bookmark.index) != 'undefined') { tinyMCE.selectElements(b, 'IMG', function (n) { if (bookmark.index-- == 0) { } | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); | return false; }); } */ | moveToBookmark : function(bookmark) { var rng, nl, i; var inst = this.instance; var doc = inst.getDoc(); var win = inst.getWin(); var sel = this.getSel(); if (!bookmark) return false; if (tinyMCE.isSafari) { sel.setBaseAndExtent(bookmark.startContainer, bookmark.startOffset, bookmark.endContainer, bookmark.endOffset); return true; } if (tinyMCE.isMSIE) { if (bookmark.rng) { bookmark.rng.select(); return true; } win.focus(); if (bookmark.tag) { rng = inst.getBody().createControlRange(); nl = doc.getElementsByTagName(bookmark.tag); if (nl.length > bookmark.index) { try { rng.addElement(nl[bookmark.index]); } catch (ex) { // Might be thrown if the node no longer exists } } } else { rng = inst.getSel().createRange(); rng.moveToElementText(inst.getBody()); rng.collapse(true); rng.moveStart('character', bookmark.start); rng.moveEnd('character', bookmark.length); } rng.select(); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko && bookmark.rng) { sel.removeAllRanges(); sel.addRange(bookmark.rng); win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } if (tinyMCE.isGecko) { // try { rng = doc.createRange(); nl = doc.getElementsByTagName(bookmark.startTag); if (nl.length > bookmark.start) rng.setStart(nl[bookmark.start].childNodes[bookmark.startIndex], bookmark.startOffset); nl = doc.getElementsByTagName(bookmark.endTag); if (nl.length > bookmark.end) rng.setEnd(nl[bookmark.end].childNodes[bookmark.endIndex], bookmark.endOffset); sel.removeAllRanges(); sel.addRange(rng); /* } catch { // Ignore }*/ win.scrollTo(bookmark.scrollX, bookmark.scrollY); return true; } return false; }, |
if (zoomChanged) { | if (zoomChanged != null) { | moveToNewExtent: function (zoomChanged) { if (zoomChanged) { // reset the layerContainerDiv's location this.layerContainerDiv.style.left = "0px"; this.layerContainerDiv.style.top = "0px"; } var bounds = this.getExtent(); for (var i = 0; i < this.layers.length; i++) { this.layers[i].moveTo(bounds, zoomChanged); } this.events.triggerEvent("move"); if (zoomChanged) this.events.triggerEvent("zoomend"); }, |
this.layers[i].moveTo(bounds, zoomChanged); | this.layers[i].moveTo(bounds, (zoomChanged != null)); | moveToNewExtent: function (zoomChanged) { if (zoomChanged) { // reset the layerContainerDiv's location this.layerContainerDiv.style.left = "0px"; this.layerContainerDiv.style.top = "0px"; } var bounds = this.getExtent(); for (var i = 0; i < this.layers.length; i++) { this.layers[i].moveTo(bounds, zoomChanged); } this.events.triggerEvent("move"); if (zoomChanged) this.events.triggerEvent("zoomend"); }, |
if (zoomChanged) this.events.triggerEvent("zoomend"); | if (zoomChanged != null) this.events.triggerEvent("zoomend", {oldZoom: zoomChanged, newZoom: this.zoom}); | moveToNewExtent: function (zoomChanged) { if (zoomChanged) { // reset the layerContainerDiv's location this.layerContainerDiv.style.left = "0px"; this.layerContainerDiv.style.top = "0px"; } var bounds = this.getExtent(); for (var i = 0; i < this.layers.length; i++) { this.layers[i].moveTo(bounds, zoomChanged); } this.events.triggerEvent("move"); if (zoomChanged) this.events.triggerEvent("zoomend"); }, |
MozillaPageBot = function(pageWindow) { | var MozillaPageBot = function(pageWindow) { | MozillaPageBot = function(pageWindow) { PageBot.call(this, pageWindow);}; |
var type = $type(returns); if (type != 'element') elements = false; | if ($type(returns) != 'element') elements = false; | Elements.Multi = function(property){ return function(){ var args = arguments; var items = []; var elements = true; $each(this, function(el){ var returns = el[property].apply(el, args); var type = $type(returns); if (type != 'element') elements = false; items.push(returns); }); if (elements) items = $$(items); return items; };}; |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.