port/archor box update, ruler function update
This commit is contained in:
@@ -28,13 +28,13 @@
|
||||
// Default editable canvas dimensions in micrometers.
|
||||
const DEFAULT_CANVAS_SIZE = { width: 5000, height: 5000 };
|
||||
// Base visual diameter and hit area used for port and anchor handles.
|
||||
const PORT_NODE_SIZE = 30;
|
||||
const PORT_NODE_SIZE = 11;
|
||||
const FREE_WIRES_BUNDLE_GROUP = 'free_wires';
|
||||
const PORT_LABEL_MIN_CHARS = 5;
|
||||
const PORT_LABEL_CHAR_WIDTH = 7;
|
||||
const PORT_LABEL_HORIZONTAL_PADDING = 12;
|
||||
// Anchor body width used in the canvas visual representation.
|
||||
const ANCHOR_NODE_WIDTH = 16;
|
||||
const ANCHOR_NODE_WIDTH = 18;
|
||||
// Default spacing between repeated anchor or port pins.
|
||||
const DEFAULT_ELEMENT_PITCH = 10;
|
||||
// Defines built-in port and anchor element metadata before per-node expansion.
|
||||
@@ -810,7 +810,7 @@
|
||||
return {
|
||||
width: data && data.elementType === 'anchor' ? ANCHOR_NODE_WIDTH : PORT_NODE_SIZE,
|
||||
height: data && data.elementType === 'anchor'
|
||||
? Math.max(PORT_NODE_SIZE / 2, PORT_NODE_SIZE / 2 + Math.max(0, portNumber - 1) * handleClearance)
|
||||
? Math.max(PORT_NODE_SIZE * 1.125, PORT_NODE_SIZE * 1.125 + Math.max(0, portNumber - 1) * handleClearance)
|
||||
: Math.max(PORT_NODE_SIZE, PORT_NODE_SIZE + Math.max(0, portNumber - 1) * handleClearance)
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user