format and comments fix
This commit is contained in:
18
index.html
18
index.html
@@ -24,9 +24,10 @@
|
||||
<button id="btn-copy">Kopiuj</button>
|
||||
<button id="btn-paste">Wklej</button>
|
||||
<button id="btn-connect">Połącz</button>
|
||||
<div class="color-wrapper"><!-- DODANE -->
|
||||
<button id="btn-change-color">Kolor</button> <!-- DODANE -->
|
||||
<div id="color-palette" style="position:absolute; display:none; padding:8px; background:#fff; border:1px solid #ccc; border-radius:6px; gap:6px; z-index:2000;"></div>
|
||||
<div class="color-wrapper">
|
||||
<button id="btn-change-color">Kolor</button>
|
||||
<div id="color-palette"
|
||||
style="position:absolute; display:none; padding:8px; background:#fff; border:1px solid #ccc; border-radius:6px; gap:6px; z-index:2000;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Zoom</p>
|
||||
@@ -41,9 +42,6 @@
|
||||
<div id="paper"></div>
|
||||
</div>
|
||||
|
||||
<!-- DODANY KONTAINER DLA PALETY KOLORÓW -->
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.min.js"></script>
|
||||
<script src="joint.js"></script>
|
||||
@@ -97,7 +95,8 @@
|
||||
if (selectedElement.attributes.type === 'standard.TextBlock') {
|
||||
selectedElement.attr('label/fill', c);
|
||||
}
|
||||
} catch(e) { /* ignoruj */ }
|
||||
} catch (e) { /* ignoruj */
|
||||
}
|
||||
}
|
||||
$palette.hide();
|
||||
});
|
||||
@@ -207,6 +206,7 @@
|
||||
const elementView = textBlock.findView(paper);
|
||||
elementView.addTools(createToolsView());
|
||||
}
|
||||
|
||||
//create shape - END
|
||||
|
||||
//init draggalble - START
|
||||
@@ -264,6 +264,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//init draggable - END
|
||||
|
||||
function getViewportCenter() {
|
||||
@@ -476,7 +477,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
function hideResizeHandle() {
|
||||
if ($resizeHandle.data('ui-resizable')) {
|
||||
$resizeHandle.resizable('destroy');
|
||||
@@ -506,8 +506,6 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Zoom
|
||||
const zoomStep = 0.2;
|
||||
const minScale = 0.2;
|
||||
|
||||
Reference in New Issue
Block a user