GithubHelp home page GithubHelp logo

Comments (4)

freegroup avatar freegroup commented on August 20, 2024

why did you open a new issue?!

the rect has already an unique id.

from draw2d.

InannaInai avatar InannaInai commented on August 20, 2024

Because you are closing the ones that are in my opinion not solved jet.

the rect has already an unique id.

How can I use this id?
I want to assing a data from a database to the rects.
I want to create a pattern with drag and drop, assign data to every rect and connection in this pattern, save this pattern and reload it again.

is this possible with draw2d?

from draw2d.

freegroup avatar freegroup commented on August 20, 2024

You can add comments even on closed issues

your code has a syntax error

 init: function (attr, setter, getter) {
    this._super(extend({
      bgColor: this.DEFAULT_COLOR,
      color: this.DEFAULT_COLOR.darker(),
      width: 50,
      height: 50,
      id="thisIsMyID"
    }, attr), setter, getter)
    this.createPort("output")
    this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())
  },

id="..." is wrong - use :

you can use figure.setUserData(....) as well. please read the API docu for details.
what did you mean with pattern?

from draw2d.

InannaInai avatar InannaInai commented on August 20, 2024

I used it with : id:"thisIsMyID", made a mistake when tried to reproduce it.

Thank for the tip with the figure.setUserData(....), must have missed it. Am kinda edgy today...
sry for that
I think my problem is, that I can't see the id with the browser, therefore I had assumed that the rect did not get the id. Tried it with alert and it worked.

from draw2d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.