mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Now the label editor color is changed by the mouse scroll - #1103
This commit is contained in:
parent
2689213fdf
commit
d290d69d33
@ -126,23 +126,17 @@ function visual_map_main() {
|
|||||||
|
|
||||||
// Begin - Background label color changer
|
// Begin - Background label color changer
|
||||||
|
|
||||||
$( "#text-label_ifr" ).contents().find( "body" ).bind("contextmenu", function(e) {
|
$( "#text-label_ifr" ).contents().find( "body" ).bind('mousewheel', function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
if($( "#text-label_ifr" ).contents().find( "body" ).css('background-color') == 'rgb(211, 211, 211)'){
|
||||||
|
$( "#text-label_ifr" ).contents().find( "body" ).css('background-color','white');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$( "#text-label_ifr" ).contents().find( "body" ).css('background-color','lightgray');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$( "#text-label_ifr" ).contents().find( "body" ).mousedown(function(e){
|
|
||||||
if(e.which == 3)
|
|
||||||
{
|
|
||||||
if($( "#text-label_ifr" ).contents().find( "body" ).css('background-color') == 'rgb(211, 211, 211)'){
|
|
||||||
$( "#text-label_ifr" ).contents().find( "body" ).css('background-color','white');
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$( "#text-label_ifr" ).contents().find( "body" ).css('background-color','lightgray');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// End - Background label color changer
|
// End - Background label color changer
|
||||||
|
|
||||||
$('#radiobtn0001').click(function(){
|
$('#radiobtn0001').click(function(){
|
||||||
|
@ -189,7 +189,7 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
|
|||||||
<td align="left" style="">' .
|
<td align="left" style="">' .
|
||||||
html_print_input_text('label', '', '', 20, 200, true) . '
|
html_print_input_text('label', '', '', 20, 200, true) . '
|
||||||
<span id="advice_label" style="font-style:italic;z-index:3;display:inline;margin-top:0px;float:right;margin-right:100px;">
|
<span id="advice_label" style="font-style:italic;z-index:3;display:inline;margin-top:0px;float:right;margin-right:100px;">
|
||||||
'.__("Click right mouse button to change the background color of the label editor").'
|
'.__("Scroll the mouse wheel over the label editor to change the background color").'
|
||||||
</span>
|
</span>
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user