#bold-italic-se-button bold and italic div change to se-button
This commit is contained in:
@@ -309,8 +309,8 @@
|
||||
</div>
|
||||
<div id="text_panel">
|
||||
<div class="toolset">
|
||||
<div class="tool_button" id="tool_bold" title="Bold Text [B]"><span></span>B</div>
|
||||
<div class="tool_button" id="tool_italic" title="Italic Text [I]"><span></span>i</div>
|
||||
<se-button id="tool_bold" title="Bold Text [B]" src="./images/bold.png"></se-button>
|
||||
<se-button id="tool_italic" title="Italic Text [I]" src="./images/italic.png"></se-button>
|
||||
</div>
|
||||
<div class="toolset" id="tool_font_family">
|
||||
<label>
|
||||
|
||||
@@ -720,32 +720,11 @@ span.zoom_tool {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#tool_bold, #tool_italic {
|
||||
font: bold 2.1em/1.1em serif;
|
||||
text-align: center;
|
||||
padding-left: 2px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#text {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
#tool_bold span, #tool_italic span {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0; left: 0;
|
||||
background: #000;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
#tool_italic {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#url_notice {
|
||||
padding-top: 4px;
|
||||
display: none;
|
||||
|
||||
@@ -2056,17 +2056,9 @@ editor.init = () => {
|
||||
|
||||
if (tagName === 'text') {
|
||||
$('#text_panel').css('display', 'inline');
|
||||
$('#tool_font_size').css('display', 'inline');
|
||||
if (svgCanvas.getItalic()) {
|
||||
$('#tool_italic').addClass('push_button_pressed').removeClass('tool_button');
|
||||
} else {
|
||||
$('#tool_italic').removeClass('push_button_pressed').addClass('tool_button');
|
||||
}
|
||||
if (svgCanvas.getBold()) {
|
||||
$('#tool_bold').addClass('push_button_pressed').removeClass('tool_button');
|
||||
} else {
|
||||
$('#tool_bold').removeClass('push_button_pressed').addClass('tool_button');
|
||||
}
|
||||
$('#tool_font_size').css('display', 'inline');
|
||||
$id('tool_italic').pressed = (svgCanvas.getItalic()) ? true : false;
|
||||
$id('tool_bold').pressed = (svgCanvas.getBold()) ? true : false;
|
||||
$('#font_family').val(elem.getAttribute('font-family'));
|
||||
$('#font_size').val(elem.getAttribute('font-size'));
|
||||
$('#text').val(elem.textContent);
|
||||
@@ -4905,6 +4897,9 @@ editor.init = () => {
|
||||
$id('layer_down').addEventListener('click', () => moveLayer(1));
|
||||
$id('layer_rename').addEventListener('click', layerRename);
|
||||
|
||||
$id('tool_bold').addEventListener('click', clickBold);
|
||||
$id('tool_italic').addEventListener('click', clickItalic);
|
||||
|
||||
const toolButtons = [
|
||||
{sel: '#tool_clear', fn: clickClear, evt: 'mouseup', key: ['N', true]},
|
||||
{sel: '#tool_save', fn () {
|
||||
@@ -4945,8 +4940,6 @@ editor.init = () => {
|
||||
{sel: '#tool_add_subpath', fn: addSubPath, evt: 'click'},
|
||||
{sel: '#tool_ungroup', fn: clickGroup, evt: 'click'},
|
||||
{sel: '#tool_unlink_use', fn: clickGroup, evt: 'click'},
|
||||
{sel: '#tool_bold', fn: clickBold, evt: 'mousedown'},
|
||||
{sel: '#tool_italic', fn: clickItalic, evt: 'mousedown'},
|
||||
{sel: '#sidepanel_handle', fn: toggleSidePanel, key: ['X']},
|
||||
{sel: '#copy_save_done', fn: cancelOverlays, evt: 'click'},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user