UIScrollView Canvas Equivalent?

I am currently collecting PoC for the Internet. I did about 9 years of iOS development, so I think in these contexts / concepts. What I need to build is similar to UIScrollView / CATiledLayer for the web.

I need to create a tool that allows users to create their own flowcharts that I have already created on iOS. I am prototyping on the Internet and I'm not sure where to start. So far, I have played with several canvas libraries.

I want to create something that can have a fixed viewport with other components displayed off-screen. The viewport has fixed borders that you can expand, and allows me to put subcomponents in the view and move them if I want.

My internet / javascript experience is pretty much Ember, React, and the plain old ES5 / ES6. My HTML skills are not so strong, and I think that maybe I missed something fundamental.

My goal is to have something that can work with the existing reactor that my company uses. I am happy to give up my decision, but would like advice on the right direction. I feel that in this area I have virtually no domain knowledge.

+5
source share
1 answer
  • This JS, Dracula library should help you a lot, since you are working with drag and drop flowcharts . You can see a working example here . NOTE This lib is based on SVG and does not use canvas.

  • Here's another beautiful live demo : The source code for JS Flowchart is here

  • Also pay attention to the dragon violin

As for ScrollView in HTML, you can just use the div with CSS styles overflow-y: scroll and / or overflow-x: scroll . Using flex layouts, in addition to creating a sense of mobility, will help you control your layout based on screen size.

Hope this helps you.

+2
source

Source: https://habr.com/ru/post/1265206/


All Articles