clientIO / clientIO/joint

Re-use div/paper to show another graph

Open
#1,442 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
5.4k
Forks
893
Avg merge
3d 3h
Merged PRs (30d)
26

Description

For my application, I want to have a div that can be associated to and show different graphs one after another. Simply re-using the same div when constructing a new Paper object produces unexpected effects e.g. while dragging elements. Is there any method to properly "shutdown" a paper object before creating a new one on the very same div? I guess easiest might then even be to call paper.remove() and create a new div every time I want to switch to a different graph?

I think somehow changing the paper's associated graph (model) could be more performant, as it wouldn't require that much DOM manipulation. Is there a way to change paper.model after constructing the paper?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Paper lifecycle around its div, including paper.remove() and the paper.model association described in the issue. Determine how switching graphs on one div should behave without stale interactions; done means repeated graph changes work correctly while dragging and avoid unnecessary DOM replacement.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.