Skip to content

Commit 8323a03

Browse files
authored
Merge pull request #585 from REDFLAG-bugs/anshuman
Tabular representation for more readable format
2 parents 4c770e9 + ce156d4 commit 8323a03

16 files changed

+63
-133
lines changed
Loading
Loading
Loading
Loading
Loading

content/en/kanvas/designer/understanding-tool-modes/index.md

Lines changed: 63 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -14,162 +14,92 @@ Kanvas Designer offers three modes: Default, Pencil, and Connector, which behave
1414

1515
You can switch between mouse modes using hotkeys or tool selection. Here are hotkeys that control your mode:
1616

17-
- <button class="kbc-button kbc-button-xs">Spacebar</button>: Temporarily enables the alternative mouse mode (default mode vs pan mode)
18-
- <button class="kbc-button kbc-button-xs">H</button>: Switches to pan mode (hand icon)
19-
- <button class="kbc-button kbc-button-xs">Escape / V</button>: Switches to default mode irrespective of which mode you are currently using.
17+
| Hotkeys | Description |
18+
|------------------------------------------------------------------|-----------------------------------------------------------------------------|
19+
| <button class="kbc-button kbc-button-xs">Spacebar</button> | Temporarily enables the alternative mouse mode (default mode vs pan mode) |
20+
| <button class="kbc-button kbc-button-xs">H</button> | Switches to pan mode (hand icon) |
21+
| <button class="kbc-button kbc-button-xs">Escape / V</button> | Switches to default mode irrespective of which mode you are currently using.|
2022

2123
## Interacting with Components
2224

2325
{{< tabpane text=true >}}
24-
{{< tab header="Select Tool" lang="en" >}}
25-
<ul>
26-
<li><b>Hover:</b> Nothing
27-
<br />Cursor style: “default (arrow)”</li>
28-
<br />
29-
<li><b>Click-and-drag:</b> Moves component in the direction of the mouse.
30-
<br />Cursor style: “move”</li>
31-
<br />
32-
<li><b>Click:</b> Selects the component and displays the component toolbar, resize box, and connections handles.
33-
<img style="width:500px;" src="./click.png" />
34-
<br />Cursor style: “default (arrow)”</li>
35-
<br />
36-
<li><b>Double-click on Component:</b> Opens the component configurator.
37-
<img style="width:500px;" src="./double_click.png" />
38-
<br />Cursor style: “pointer”</li>
39-
<br />
40-
<li><b>Double-click on Textbox:</b> Enables text editing inside the component.
41-
<img style="width:500px;" src="./text-box-double-click.gif" />
42-
<br />Cursor style: “text”</li>
43-
<br />
44-
<li><b>Right-click:</b> Opens the circular component context menu.
45-
<img style="width:500px;" src="./right_click.png" />
46-
<br />Cursor style: “default (arrow)”</li>
47-
<br />
48-
<li><b>Click-and-hold:</b> Initiates box selection for selecting multiple components.
49-
<img style="width:500px;" src="./select.gif" />
50-
<br />Cursor style: “crosshair”</li>
51-
<br />
52-
<li><b>Scroll wheel:</b> Pan up or down in the direction of the mouse.
53-
<br />Cursor style: "default (arrow)”</li>
54-
<br />
55-
<li><b>Scroll wheel + CMD/CTL:</b> Zoom in/out in the direction of the mouse.
56-
<br />Cursor style: "default (arrow)”</li>
57-
<br />
58-
<li><b>Horizontal scroll wheel:</b> Pan left or right in the direction of the mouse.
59-
<br />Cursor style: "default (arrow)”</li>
60-
<br />
61-
</ul>
26+
27+
{{% tab header="Select Tool" lang="en" active="true" %}}
28+
29+
| Action | Cursor Style | Behavior | Example |
30+
|--------------------------------|---------------------|------------------------------------------------------------------------------|-------------------------------------------------------------------------|
31+
| **Hover** | `default (arrow)` | Nothing | ![Click](./default.gif) |
32+
| **Click-and-drag** | `move` | Moves component in the direction of the mouse | ![Click and drag](./click_and_drag.gif) |
33+
| **Click** | `default (arrow)` | Displays component toolbar, resize box, and connection handles | ![Click](./click.png) |
34+
| **Double-click (component)** | `pointer` | Opens the component configurator | ![Double-click component](./double_click.png) |
35+
| **Double-click (textbox)** | `text` | Enables text editing inside the component | ![Double-click textbox](./text-box-double-click.gif) |
36+
| **Right-click** | `default (arrow)` | Opens the circular component context menu | ![Right-click](./right_click.png) |
37+
| **Click-and-hold** | `crosshair` | Initiates box selection for selecting multiple components | ![Box selection](./select.gif) |
38+
| **Scroll wheel** | `default (arrow)` | Pan up or down | ![Scroll](./scroll_up_down.gif) |
39+
| **Scroll wheel + CMD/CTRL** | `default (arrow)` | Zoom in/out | ![Zoom](./zoom_in_out.gif) |
40+
| **Horizontal scroll wheel** | `default (arrow)` | Pan left or right | ![Scroll left/right](./scroll_left_right.gif) |
6241

6342
{{< /tab >}}
64-
{{< tab header="Pencil Tool" lang="en" >}}
43+
44+
{{% tab header="Pencil Tool" lang="en" action="true" %}}
45+
6546
Pencil lines do not connect individual components, but offer annotating capability, allowing you to take notes and draw annotations to enhance your designs.
66-
<ul>
67-
<li><b>Hover:</b> Nothing
68-
<br />Cursor style: “custom(pencil)”</li>
69-
<br />
70-
<li><b>Mouse down:</b> Initiates the pencil tool.
71-
<br />Cursor style: “custom(pencil)”</li>
72-
<br />
73-
<li><b>Mouse down and drag:</b> Start drawing a freeform line.
74-
<img style="width:500px;" src="./pencil.gif" />
75-
<br />Cursor style: “custom(pencil)”</li>
76-
<br />
77-
<li><b>Mouse down + CTRL/CMD:</b> Start drawing a straight line in the direction of the mouse, which will initiate and remain as either a vertical or horizontal line.
78-
<br />Cursor style: “custom(pencil)”</li>
79-
<br />
80-
<li><b>Mouse down + SHIFT:</b> Start drawing a straight line in the direction of the mouse, which will initiate and remain as either a vertical or horizontal line.
81-
<br />Cursor style: “custom(pencil)”</li>
82-
<br />
83-
<li><b>Mouse up</b>: Complete the line and renders into a component with full styling capabilities.
84-
<br />Cursor style: “custom(pencil)”</li>
85-
<br />
86-
<li><b>Click</b>: Draws ink from the pencil.
87-
<br />Cursor style: “custom(pencil)”</li>
88-
<br />
89-
<li><b>Scroll wheel</b>: Nothing
90-
<br />Cursor style: “custom(pencil)”</li>
91-
<br />
92-
<li><b>Scroll wheel \+ CMD/CTL</b>: Nothing
93-
<br />Cursor style: “custom(pencil)”</li>
94-
</ul>
95-
<!-- *Developer notes:*
9647

97-
1. *In the future, the canvas moves with the pen/pencil as they near the edge of the viewport.*
48+
| Action | Cursor Style | Behavior | Example |
49+
|-----------------------------|---------------------|--------------------------------------------------------|----------------------------------------------------------------|
50+
| **Hover** | `custom(pencil)` | Nothing | ![Pencil hover](./pencil_hover.gif) |
51+
| **Mouse down + drag** | `custom(pencil)` | Start drawing a freeform line | ![Freeform line](./pencil.gif) |
52+
| **Mouse down + SHIFT** | `custom(pencil)` | Start drawing a straight vertical or horizontal line | ![Straight line](./mouse_down_plus_shift.gif) |
53+
| **Mouse up** | `custom(pencil)` | Complete the line and render into a styled component | ![Mouse up](./mouse_up.gif) |
54+
| **Click** | `custom(pencil)` | Draws ink from the pencil | ![Ink](./pencil_ink.gif) |
55+
| **Scroll wheel** | `custom(pencil)` | Nothing | ![Mouse down](./mouse_down.gif) |
56+
| **Scroll wheel + CMD/CTRL** | `custom(pencil)` | Nothing | ![Zoom](./zoom_in_out.gif) |
57+
58+
<!-- *Developer notes:*
59+
1. *In the future, the canvas moves with the pen/pencil as they near the edge of the viewport.*
9860
2. *In the future, the scroll wheel will behave as it normally does in default mode.* -->
9961

10062
{{< /tab >}}
101-
{{< tab header="Pen Tool" lang="en" >}}
102-
103-
The Pen tool operates as a creator of annotation edges. Note that the pen tool has two behaviors depending upon the context in which you initiate the connection.
10463

105-
The Pen Tool Mode is activated using <button class="kbc-button kbc-button-xs" style="max-width:fit-content;margin:0px;position:relative;display:inline;">CMD+E</button>
64+
{{% tab header="Pen Tool" lang="en" action="true" %}}
10665

107-
{{< alert title="Connector Behaviors">}}
108-
**Component-connect Behavior**: When you click an empty spot on the canvas, and drag to another empty spot on the canvas, you get a **joint** (aka a terminal node) from which you can create new connections as well as new edge relationships.
66+
The Pen tool operates as a creator of annotation edges. Note that the pen tool has two behaviors depending upon the context in which you initiate the connection.
10967

110-
**Canvas-connect Behavior**: When you click an empty spot on the canvas, and drag to an existing component, you get an annotation edge relationship.
68+
**To Activate:** `(CMD/CTRL)+E`
11169

112-
{{< /alert >}}
113-
<ul>
114-
<li><b>Hover:</b> Nothing
115-
<img style="width:250px;" src="./tool-mode-placeholder.svg" />
116-
<br />Cursor style: “pen”</li>
117-
<br />
118-
<li><b>Mouse down and drag:</b> Nothing
70+
<details>
71+
<summary><strong>Connector Behaviors</strong></summary>
11972

120-
Creating connections happens in three phases.
73+
- **Component-connect Behavior**: When you click an empty spot on the canvas, and drag to another empty spot on the canvas, you get a joint (aka a terminal node) from which you can create new connections as well as new edge relationships.
74+
- **Canvas-connect Behavior**: When you click an empty spot on the canvas, and drag to an existing component, you get an annotation edge relationship.
12175

122-
<b>Click</b> (press primary mouse button and release):
123-
Initiate connection.
76+
</details>
12477

125-
<img style="width:250px;" src="./tool-mode-placeholder.svg" />
78+
| Phase | Cursor Style | Behavior | Example |
79+
|------------------------------|--------------|--------------------------------------------------------------|-----------------------------------------------------------------|
80+
| **1. Click & release** | `pen` | Initiate connection | ![Phase 1](./click_release_ptm.gif) |
81+
| **2. Click-and-move** | `pen` | Move the ghost edge around if a connection was initiated | ![Phase 2](./click_move_ptm.gif) |
82+
| **3. Click while connecting**| `pen` | Establish and render the connection | ![Phase 3](./click_while_connecting_ptm.gif) |
12683

127-
<br />Cursor style: “pen”</li>
128-
<br />
129-
<li><b>Click and move:</b> if a connection was initiated, moves the ghost edge around else does nothing.
84+
<!--
85+
*Developer notes:*
86+
1. *In future, when the connector is released on an empty spot on the canvas, offer a component picker from which users can always choose a “Joint” component.*
87+
2. *Rename PenTerminalNode to “**Joint**”, unless there’s something better to call it.*
88+
-->
13089

131-
<img style="width:250px;" src="./tool-mode-placeholder.svg" />
90+
{{< /tab >}}
13291

133-
<br />Cursor style: “pen” and the annotation edge following the mouse around.</li>
134-
<br />
135-
<li><b>Click while connecting</b>: Establish and render connection.
136-
<img style="width:250px;" src="./tool-mode-placeholder.svg" />
137-
<br />Cursor style: “pen”</li>
138-
<br />
139-
<li><b>Click and move:</b> if a connection was initiated, moves the ghost edge around else does nothing.
92+
{{% tab header="Pan Tool" lang="en" action="true" %}}
14093

141-
<img style="width:250px;" src="./tool-mode-placeholder.svg" />
94+
The table below outlines the mouse interaction modes available in <strong>Kanvas</strong> while using, detailing cursor styles and their expected behavior.
14295

143-
<br />Cursor style: “pen” and the annotation edge following the mouse around.</li>
144-
<br />
145-
<li><b>Click while connecting</b>: Establish and render connection.
146-
<img style="width:250px;" src="./tool-mode-placeholder.svg" />
147-
<br />Cursor style: “pen”</li>
148-
<br />
149-
<li><b>How to Draw and Connect Lines</b>
150-
<img style="width:500px;" src="./draw_line.gif" /></li>
96+
| Action | Cursor Style | Behavior |
97+
|-----------------------------|---------------------|----------------------------------------------------------|
98+
| **Hover** | `hand` | Nothing |
99+
| **Click-and-hold** | `grabbing-hand` | Grab the canvas and pan in the direction of mouse movement |
100+
| **Scroll wheel + CMD/CTRL** | `grabbing-hand` | Zoom in/out in the direction of the mouse |
101+
| **Horizontal scroll wheel** | `grabbing-hand` | Pan left or right in the direction of the mouse |
151102

152-
<li><b>How to customize nodes at the ends of connections</b><br />
153-
<img style="width:500px;" src="./customize_end.gif" /></li>
154-
</ul>
155-
<!--
156-
*Developer notes:*
103+
{{% /tab %}}
157104

158-
1. *In future, when the connector is released on an empty spot on the canvas, offer a component picker from which users can always choose a “Joint” component.*
159-
2. *Rename PenTerminalNode to “**Joint**”, unless there’s something better to call it.* -->
160-
{{< /tab >}}
161-
{{< tab header="Pan Tool" lang="en" >}}
162-
<ul>
163-
<li><b>Hover:</b> Nothing</b>
164-
<br />Cursor style: “hand”</li>
165-
<br />
166-
<li><b>Click-and-hold:</b> Grab the canvas and pan in the direction of mouse movement.
167-
<br />Cursor style: “grabbing-hand”</li>
168-
<br />
169-
<li><b>Scroll wheel \+ CMD/CTL</b>: Zoom in/out in the direction of the mouse.
170-
<br />Cursor style: “grabbing-hand”</li>
171-
<br />
172-
<li><b>Horizontal scroll wheel</b>: Pan left or right in the direction of the mouse.
173-
<br />Cursor style: “grabbing-hand”</li>
174-
{{< /tab >}}
175105
{{< /tabpane >}}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)