Menu

scrolling canvas while dragging

jin1212
2007-03-13
2013-04-17
  • jin1212

    jin1212 - 2007-03-13

    Hello,
         I'm trying to create an ajax flowchart builder using js-graph.it and I ran into a problem. My canvas will be indefinetly large, so scrollbars will be needed. The problem is that the draggable block does not scroll inside the canvas while I'm dragging the block. This will be a real pain for the end users if they need to drag on block from one corner to another. They would need to repeat the process of scrolling and then drag/drop many times before they can reach their destination.

    Does js-graph.it currently support scrolling while dragging? If not, can someone give me some guidance so I(or someone else) can possibly incorporate this functionality into js-graph.it.

    thank you, jin

     
    • luca zenti

      luca zenti - 2007-03-13

      Hi Jin,
      you're right, it is really ugly to have to drop the block, scroll and drag it again. I've never thought about such an issue, I can imagine how to resolve it, but it can be a little hard to do.
      By now, I'm trying to refactor some code to fix some bugs, I will surely keep in mind this need.

      A possible solution would be to modify the drag & drop section and make the innerDiv of the canvas scroll when the element (not only blocks, every draggable elements should behave this way) reaches its constraint. If I can find the time, this evening I'll try this trick, then I'll let you know my plans about it. Any help is very welcome, anyway.

      Bye.

       
      • jin1212

        jin1212 - 2007-03-30

        Hello zenluca,
        Thanks for the reply. I have been using js-graph.it to create an ajax flowchart builder for my company.
        It's a very useful library.Everything is great so far except for the drag&drop constraint problem. Were you able to fix this problem by making the canvas autoscroll?

        thanks, jin

         
    • luca zenti

      luca zenti - 2007-04-12

      Hi,
      I nearly did it... do you also need the canvas to enlarge when dragging blocks?

       
    • jin1212

      jin1212 - 2007-04-12

      Wow, that's great news.
      If the canvas can be enlarged when the blocks are dragged to the edge, that would be great, granted if you have time on your hand.
      I know most of the desktop flowchart builders behaves this way also. Thank you so much for taking the time to address this issue.
      Please let me know when you are doing another release of js-graph.it.

      Thank you, jin

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.