Giter Club home page Giter Club logo

act.svg's Introduction

Korey's Holopin Board

@Korey's Holopin board

act.svg's People

Contributors

koreyhinton avatar

Watchers

 avatar  avatar  avatar

act.svg's Issues

Allow Nodes To Overlap

Some nodes are able to overlap already because of their sorted priority (e.g, text in a rectangle, nodes in a swimlane, etc)
This will require a change to the design of how selection works. Rather than querying nodes by x,y position, instead it would track the selected nodes with an id attribute on the Svg node.

Click-Drag rectangle selection

A user that tries to do the normal click-drag will be stumped by weird behavior of rect-select (#10). Mentioned having rect-select part of dropdown in #15, however I'm thinking start the click behavior initially but then holding click and dragging enough away from initial click should cancel out any click-selection and start the rect-selection.

The dropdown still might make sense for other click-select scenarios, however rect-selection should just override any other select feature (dropdown/single click select).

align elements

use case: while moving mouse left-to-right you intermittently type ctrl-v to paste the same rect node in different places that are almost an aligned row, however it won't be exact and you'd want to fix them all to have the same Y.

In this case when you select them all and change the y attribute in single xml node textarea (that smart maps to all nodes), rather than moving them all by the difference you expect them to become exactly lined up (either to the min or max y value to all become equal).

This means smart mapping an attribute change between elements will have another mode of operating.

One solution option: have toggle controls for keeping alignment fixed, e.g., [|] vertical align and [--] horiz. align buttons next to the Done button.

Copy SVG XML button

Provide a button to quickly copy all the SVG's xml, so that it can be pasted into a different editor or in a different tab instance.

addon-palettes

palettes containing other UML elements (other than activity diagram).
not doing a comprehensive list, just some of them
Links in the footer - opens the app as a new instance window in a special mode that minimizes everything but the editing image

Download SVG Button

Provide a download button if the user wants to quickly take a backup.

  • file name = act.svg

clean-up UI

somewhat improved toolbar buttons
improved appearance of mode-change notification message

Copy paste selection

possible keyboard shortcut options

  • c => copy, p => paste (should it also copy the xml of node selection to place in other tabbed instance?*)
  • d => duplicate

* #6 {Copy between App Instances})

places duplicated nodes at position x,y of the mouse cursor, depends on #2{overlapping nodes}

Node Snapping for rectangles and ondraw start (also for lines)

Using a much smaller threshold than the self-snap for lines.

Examples:

draw a 90 degree connection by free hand to connect line and polyline will likely result in a small gap.

  1. draw line downward
  2. start drawing arrow from end of line horizontally toward the right
  3. it should autocorrect and connect the polyline to the line

drawing a rectangle almost in line with a rectangle above it should correct

  1. draw a rectangle to match 1 above it
  2. on start drawing the 2nd rect should autocorrect left side to align with upper rect
  3. on mousemove to be close to right-side of upper rect should auto correct to line up drawing rect

CTRL-A

shortcut to select all nodes

Copy Between App Instances

A node selection should be able to be copied between app tab instances.

2 pieces of functionality:

  • copying the XML of the just the selected nodes (e.g., via Ctl-c or c shortcut)
  • right now editing the full xml is not possible, perhaps provide another means via button or keyboard shortcut (e.g., Ctl-v or p shortcut) that automatically places the xml into the svg doc

Copy/Cut/Paste not working when served on localhost

repro steps

cd act.svg
python3 -m http.server

(http://0.0.0.0:8000/)

try copy/cut and console error says navigator.clipboard is undefined

Cannot read properties of undefined (reading 'writeText')

info

clipboard requires a secure origin (ie: https instead of http), see https://stackoverflow.com/questions/71873824/copy-text-to-clipboard-cannot-read-properties-of-undefined-reading-writetext

perhaps document.execCommand("copy") works instead when being served this way.

workarounds

just open index.html from filesystem (if not on firefox* )
OR use ssl as part of web server w/ https URI , probably more work than simple py3 -m http.server

* open in firefox appears to be trying to use file:///run directory and can't find my js scripts there

CI tests

  • ci workflow
  • enable command line / node testing running, e.g., via jsdom

CTRL-Z

implement undo stack. (also look into undo trees)

Dropdown to choose selection

When there are swimlanes and rectangular selection (#10) is attempted for an element within a lane, then it will actually click to choose the swimlane and rect selection won't work. This can't be resolved by ignoring swimlane single-select clicks because it might make it impossible to select the swimlane/outer rectangle (if rect arround entire page is added).

Don't necessary want to go down the path of layers and groups, etc, as that is a lot of dev work and additional editing features the user has to make use of just to select something.

Having a dropdown to pick which one you meant here might be a good solution. This means you'd not have to worry that single-click select something actually selected something different, e.g.: you want to click an action node rectangle only, however since you click within the bounds of the text that mostly fills the action node rectangle. Since your click was within 2 valid bounds then dropdown will give you the ability to choose, and maybe always give an option to do rectangular select (e.g.: in cases you meant to click the background to start rect-select).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.