Skip to content
Discussion options

You must be logged in to vote

When I comment out the group and args, the port shows up on the left side by default.

But when I set the group and provide args for absolute positioning, the port doesn’t show up at all.

I'm trying to let the user add a port anywhere they want by specifying exact x, y coordinates.
The element is a custom element I created, and I want to make sure ports can be added at any position dynamically.

Here’s my current code — how can I fix it so that adding ports at custom positions works as expected?

import { dia, util } from "@joint/core";

export default class LiquidTank extends dia.Element {
  defaults() {
    return {
      ...super.defaults,
      type: "LiquidTank",
      size: { width: 160, 

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@omoghadasi
Comment options

@kumilingus
Comment options

@omoghadasi
Comment options

Answer selected by omoghadasi
@kumilingus
Comment options

@omoghadasi
Comment options

@kumilingus
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants