mirror of
https://github.com/altoiddealer/--sd-webui-ar-plusplus.git
synced 2026-04-25 00:38:55 +00:00
Add prefix for element ids (For CSS and JS)
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
if ("undefined" === typeof ar_button_titles) {
|
||||
ar_button_titles = {};
|
||||
if ("undefined" === typeof arsp__ar_button_titles) {
|
||||
arsp__ar_button_titles = {};
|
||||
}
|
||||
|
||||
ar_button_titles["Calc"] = "Show or hide the aspect ratio calculator";
|
||||
ar_button_titles["\u{21c5}"] = "Swap width and height values";
|
||||
ar_button_titles["\u2B07\ufe0f"] = "Get dimensions from txt2img/img2img sliders";
|
||||
ar_button_titles["\u{1f5bc}"] = "Get dimensions from image on current img2img tab";
|
||||
ar_button_titles["Calculate Height"] = "Calculate new height based on source aspect ratio";
|
||||
ar_button_titles["Calculate Width"] = "Calculate new width based on source aspect ratio";
|
||||
ar_button_titles["Apply"] = "Apply calculated width and height to txt2img/img2img sliders";
|
||||
arsp__ar_button_titles["Calc"] = "Show or hide the aspect ratio calculator";
|
||||
arsp__ar_button_titles["\u{21c5}"] = "Swap width and height values";
|
||||
arsp__ar_button_titles["\u2B07\ufe0f"] = "Get dimensions from txt2img/img2img sliders";
|
||||
arsp__ar_button_titles["\u{1f5bc}"] = "Get dimensions from image on current img2img tab";
|
||||
arsp__ar_button_titles["Calculate Height"] = "Calculate new height based on source aspect ratio";
|
||||
arsp__ar_button_titles["Calculate Width"] = "Calculate new width based on source aspect ratio";
|
||||
arsp__ar_button_titles["Apply"] = "Apply calculated width and height to txt2img/img2img sliders";
|
||||
|
||||
onUiUpdate(function(){
|
||||
gradioApp().querySelectorAll('#txt2img_container_aspect_ratio button, #img2img_container_aspect_ratio button').forEach(function(elem){
|
||||
tooltip = ar_button_titles[elem.textContent];
|
||||
gradioApp().querySelectorAll('#arsp__txt2img_container_aspect_ratio button, #arsp__img2img_container_aspect_ratio button').forEach(function(elem){
|
||||
tooltip = arsp__ar_button_titles[elem.textContent];
|
||||
if(tooltip){
|
||||
elem.title = tooltip;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user