jeudi 27 août 2020

emberjs + gojs integration

Hey guys I am trying out emberjs and want to integrate goJS to it. I did an npm install of the package https://www.npmjs.com/package/gojs But I can't find any good documentation on this.. so if anyone can point out my error that will be great

import Component from "@glimmer/component";
import go from "gojs";
import { action } from "@ember/object";
import { tracked } from "@glimmer/tracking";

export default class GraphComponent extends Component {
  @tracked iconName = "check-circle";

  $ = go.GraphObject.make;
  myDiagram = $(go.Diagram, "myDiagramDiv");



  @action
  changeIcon() {
    if (this.iconName == "check-circle") {
      this.iconName = "sync-alt";
    } else {
      this.iconName = "check-circle";
    }
  }
}

This is my ember component graph.js and In graph.hbs I have the corresponding div but some how nothing shows up on the screen. am I missing something ?

And would also appreciate any links to a goJS with emberJS docs.TY




Aucun commentaire:

Enregistrer un commentaire