TaoReactDev
TaoReactDev

Reputation: 43

Why paper overrides my custom html divs (joint js)?

I have this html:

<div class='paper-container' id="wrapper">
    <div class='paper' id="paper" style='margin-bottom: 0px; margin-right: 0px;'>
        <div id='linkMenu'>
          <ul id='linkMenu-items'>
            <li class='contextOption' name='deleteLink'>Delete link</li>
            <li class='contextOption' name='showStart'>Show link start</li>
            <li class='contextOption' name='showEnd'>Show link end</li>
          </ul>
        </div>
    </div>
</div>

After application renders and reach this point,

 var paper = new joint.dia.Paper({
        el: $("#paper"),
        width: PAPER_WIDTH,
        model: graph,
        ...
   )};

enter image description here]

Upvotes: 0

Views: 151

Answers (1)

TaoReactDev
TaoReactDev

Reputation: 43

For anyone facing this problem, I will suggest another solution which is to move the div out of scope of the paper and append it based on its action.

paper.$el.append($('#linkMenu'));
  • For more details please click the link below:

https://github.com/clientIO/joint/issues/1212

Upvotes: 1

Related Questions