mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 17:24:00 +00:00
diagram zoom
This commit is contained in:
@@ -717,7 +717,7 @@
|
|||||||
function createMenu() {
|
function createMenu() {
|
||||||
return [
|
return [
|
||||||
menu,
|
menu,
|
||||||
settings?.chooseColumnProperties && [
|
settings?.customizeStyle && [
|
||||||
{ divider: true },
|
{ divider: true },
|
||||||
{
|
{
|
||||||
text: 'Column properties',
|
text: 'Column properties',
|
||||||
@@ -755,7 +755,39 @@
|
|||||||
text: 'Keys And Not Null',
|
text: 'Keys And Not Null',
|
||||||
onClick: changeStyleFunc('filterColumns', 'keysAndNotNull'),
|
onClick: changeStyleFunc('filterColumns', 'keysAndNotNull'),
|
||||||
},
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `Zoom - ${(value?.style?.zoomKoef || 1) * 100}%`,
|
||||||
|
submenu: [
|
||||||
|
{
|
||||||
|
text: `10 %`,
|
||||||
|
onClick: changeStyleFunc('zoomKoef', 0.1),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `15 %`,
|
||||||
|
onClick: changeStyleFunc('zoomKoef', 0.15),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `20 %`,
|
||||||
|
onClick: changeStyleFunc('zoomKoef', 0.2),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `40 %`,
|
||||||
|
onClick: changeStyleFunc('zoomKoef', 0.4),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `60 %`,
|
||||||
|
onClick: changeStyleFunc('zoomKoef', 0.6),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `80 %`,
|
||||||
|
onClick: changeStyleFunc('zoomKoef', 0.8),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: `100 %`,
|
||||||
|
onClick: changeStyleFunc('zoomKoef', 1),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -773,7 +805,9 @@
|
|||||||
bind:this={domCanvas}
|
bind:this={domCanvas}
|
||||||
on:dragover={e => e.preventDefault()}
|
on:dragover={e => e.preventDefault()}
|
||||||
on:drop={handleDrop}
|
on:drop={handleDrop}
|
||||||
style={`width:${canvasWidth}px;height:${canvasHeight}px;`}
|
style={`width:${canvasWidth}px;height:${canvasHeight}px;
|
||||||
|
${settings?.customizeStyle && value?.style?.zoomKoef ? `zoom:${value?.style?.zoomKoef};` : ''}
|
||||||
|
`}
|
||||||
on:mousedown={e => {
|
on:mousedown={e => {
|
||||||
if (e.button == 0 && settings?.canSelectTables) {
|
if (e.button == 0 && settings?.canSelectTables) {
|
||||||
callChange(
|
callChange(
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function shouldShowColumn(table, column, style) {
|
function shouldShowColumn(table, column, style) {
|
||||||
if (!settings?.chooseColumnProperties) {
|
if (!settings?.customizeStyle) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
switch (style?.filterColumns || 'all') {
|
switch (style?.filterColumns || 'all') {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
canSelectTables: true,
|
canSelectTables: true,
|
||||||
allowChangeColor: true,
|
allowChangeColor: true,
|
||||||
appendTableSystemMenu: true,
|
appendTableSystemMenu: true,
|
||||||
chooseColumnProperties: true,
|
customizeStyle: true,
|
||||||
}}
|
}}
|
||||||
referenceComponent={DiagramDesignerReference}
|
referenceComponent={DiagramDesignerReference}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
canSelectTables: false,
|
canSelectTables: false,
|
||||||
allowChangeColor: false,
|
allowChangeColor: false,
|
||||||
appendTableSystemMenu: false,
|
appendTableSystemMenu: false,
|
||||||
chooseColumnProperties: false,
|
customizeStyle: false,
|
||||||
}}
|
}}
|
||||||
referenceComponent={QueryDesignerReference}
|
referenceComponent={QueryDesignerReference}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user