{
  "draw2d": [
    {
      "type": "shape_designer.figure.PolyRect",
      "id": "722d9720-c010-73b7-4026-b9e994a271b3",
      "x": 7965.392974999997,
      "y": 7989.984375,
      "width": 69,
      "height": 20,
      "alpha": 1,
      "selectable": true,
      "draggable": true,
      "angle": 0,
      "userData": {
        "baseClass": "draw2d.SetFigure",
        "code": "/**\n * Generated Code for the Draw2D touch HTML5 lib.\n * File will be generated if you save the *.shape file.\n *\n * by 'Draw2D Shape Designer'\n *\n * Custom JS code to tweak the standard behaviour of the generated\n * shape. add your custom code and event handler here.\n *\n * Looks disconcerting - extending my own class. But this is a good method to\n * merge basic code and override them with custom methods.\n */\ntestShape = testShape.extend({\n\n    init: function(attr, setter, getter){\n         this._super(attr, setter, getter);\n\n         // your special code here\n        this.attr({resizeable:false});\n        this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy());\n        \n        var _this = this;\n        \n        // handle the size of the shape if the label has changed\n        //\n        var adjustWidth = function(){\n            var width = _this.layerGet(\"label\").getBBox().width+15\n\n            _this.setWidth(width+5);\n            _this.layerAttr(\"BoundingBox\", { path: `M0 0 L${width} 0 L${width} 20 L0 20 Z`})\n            _this.layerAttr(\"outline\",     { path: `M0 10 L13 0 L${width} 0 L${width} 20 L13 20 Z`})\n          \n        }\n        this.on(\"change:userData.signalId\",function(emitter, event){\n            _this.layerAttr(\"label\", {text: event.value})\n            adjustWidth()\n        });\n        this.on(\"added\", function(){\n            var signalId = _this.attr(\"userData.signalId\")\n            if(!signalId){\n                signalId = \"Signal_Id\"\n                _this.attr(\"userData.signalId\", signalId)\n            }            \n            _this.layerAttr(\"label\", {text: signalId})\n            adjustWidth()\n        })\n        \n        // get the connected port and forward the port to the related party ( SignalSource shape)\n        //\n        this.getInputPort(0).on(\"connect\", function(emitter, event){\n           _this.signalPort = event.connection.getSource()\n        })\n        this.getInputPort(0).on(\"disconnect\", function(emitter, event){\n            delete _this.signalPort\n        })\n    },\n\n    /**\n     *  Called by the simulator for every calculation\n     *  loop\n     *  @required\n     **/\n    calculate:function(context)\n    {\n        var signalId = this.attr(\"userData.signalId\")\n        // first check if any object already create the signal context\n        if(!context.signalPorts){\n            context.signalPorts = { };\n        }\n        \n        // check if my signal port is set \n        if(this.signalPort){\n            if(!(signalId in context.signalPorts)){\n                context.signalPorts[signalId] = this.signalPort;\n            }\n        }\n        else{\n            delete context.signalPorts[signalId]\n        }\n    },\n\n\n    /**\n     *  Called if the simulation mode is starting\n     *  @required\n     **/\n    onStart:function()\n    {\n        console.log(\"start\")\n    },\n\n    /**\n     *  Called if the simulation mode is stopping\n     *  @required\n     **/\n    onStop:function()\n    {\n        console.log(\"end\")\n    },\n\n\n    getParameterSettings: function()\n    {\n        return [\n        {\n            name:\"signalId\",\n            label:\"Signal Id\",\n            property:{\n                type: \"string\"\n            }\n        }];\n    },\n    \n    /**\n     * Get the simulator a hint which kind of hardware the shapes requires or supports\n     * This helps the simulator to bring up some dialogs and messages if any new hardware is connected/get lost\n     * and your are running a circuit which needs this kind of hardware...\n     **/\n    getRequiredHardware: function(){\n      return {\n        raspi: false,\n        arduino: false\n      }\n    },\n    \n    \n  /**\n   * @private\n   */\n  applyTransformation: function () {\n    let s =\n      // override the base implementation and do not scale the internal SVG elements....this let the arrow looks a like streche...we\n      // calculate the path in the event handler. A lot more code....but the result is much cleaner\n      //\"S\" + this.scaleX + \",\" + this.scaleY + \",0,0 \" +\n      \"R\" + this.rotationAngle + \",\" + ((this.getWidth() / 2) | 0) + \",\" + ((this.getHeight() / 2) | 0) +\n      \"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY() +\n      \"\"\n    this.svgNodes.transform(s)\n    if (this.rotationAngle === 90 || this.rotationAngle === 270) {\n      let before = this.svgNodes.getBBox(true)\n      let ratio = before.height / before.width\n      let reverseRatio = before.width / before.height\n      let rs = \"...S\" + ratio + \",\" + reverseRatio + \",\" + (this.getAbsoluteX() + this.getWidth() / 2) + \",\" + (this.getAbsoluteY() + this.getHeight() / 2)\n      this.svgNodes.transform(rs)\n    }\n\n    return this\n  }\n\n});",
        "name": "outline",
        "markdown": "# Signal Target\n\nWhen you don’t want to route too many wires, how about trying `signal` elements.\n\n\nA `signal` shape is an electrical design primitive. It is used to make an electrical \nconnection between one schematic group and another group, or sheet symbol in a \ndesign. The name of the `signal` defines the connection. \n\nA `signal target` on a schematic sheet connects to `signals source`\nor sheet entries with the **same name** in the project.",
        "type": "Output",
        "direction": 1
      },
      "cssClass": "shape_designer_figure_PolyRect",
      "ports": [],
      "bgColor": "rgba(255,255,255,1)",
      "color": "rgba(0,120,242,1)",
      "stroke": 1,
      "radius": 0,
      "dasharray": null,
      "vertices": [
        {
          "x": 7965.392974999997,
          "y": 7999.167175000006
        },
        {
          "x": 7978.494557377107,
          "y": 7989.984375
        },
        {
          "x": 8034.392974999997,
          "y": 7989.984375
        },
        {
          "x": 8034.392974999997,
          "y": 8009.984375
        },
        {
          "x": 7976.875052748868,
          "y": 8009.984375
        }
      ],
      "blur": 0,
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.SizeFilter"
        },
        {
          "name": "shape_designer.filter.StrokeFilter"
        },
        {
          "name": "shape_designer.filter.FillColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtLabel",
      "id": "2369ca87-43d5-837d-cc3e-448f9f9747e4",
      "x": 7974.575775000003,
      "y": 7989.234375,
      "width": 51.375,
      "height": 21.25,
      "alpha": 1,
      "selectable": true,
      "draggable": true,
      "angle": 0,
      "userData": {
        "name": "label"
      },
      "cssClass": "shape_designer_figure_ExtLabel",
      "ports": [],
      "bgColor": "rgba(0,0,0,0)",
      "color": "rgba(27,27,27,1)",
      "stroke": 0,
      "radius": 0,
      "dasharray": null,
      "text": "Signal_ID",
      "outlineStroke": 0,
      "outlineColor": "rgba(0,0,0,0)",
      "fontSize": 12,
      "fontColor": "rgba(0,120,242,1)",
      "fontFamily": null,
      "editor": "LabelInplaceEditor",
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FontSizeFilter"
        },
        {
          "name": "shape_designer.filter.FontColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtPort",
      "id": "fd38272c-22f5-46fb-3f8d-2d70036a8113",
      "x": 7959.096175000003,
      "y": 7994.984375,
      "width": 10,
      "height": 10,
      "alpha": 1,
      "selectable": true,
      "draggable": true,
      "angle": 0,
      "userData": {
        "name": "Port",
        "type": "Input",
        "direction": 3,
        "fanout": null
      },
      "cssClass": "shape_designer_figure_ExtPort",
      "ports": [],
      "bgColor": "rgba(55,177,222,1)",
      "color": "rgba(27,27,27,1)",
      "stroke": 1,
      "dasharray": null,
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FanoutFilter"
        },
        {
          "name": "shape_designer.filter.PortDirectionFilter"
        },
        {
          "name": "shape_designer.filter.PortTypeFilter"
        }
      ]
    }
  ],
  "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAAApCAYAAABeKYVuAAAJpElEQVRoQ+2aeXRU1R3Hv+++bSaTyTKZJJPJJECAkA0QwxIwgMhStkCoQl2rokZAqYLWKoUearVVtMfT0irY7Xg8VOVUW3p62lO7sagBCRBCwAUlEBMIQsiEmcxk3nZ77o0sRZJIEqaFzv0nmbw37/d7n/u939/v3hMBsXHZCQiXPUIsAGKQoyCCGOQY5CgQiEKImJJjkKNAIAohYkqOQY4CgSiEuExKpgIe9idCFlKgUCMK7xH9ELJqItwewLOu1u6C9z3kpQdVW0pqpl0QZzhVTEpxCG3dJXGlXacUOBWi4cYg3jafcr7VXf59C/mxE06bars200kX5rqlecWZxDEwhZDukrjSrkdMYFudqb+131gf/oFzaXf59w3kiio5zpufmqzQyakOoWLqYHHMPSNleUjqVceX82zTgF9X6ZEVf42sCz7pfPjyQ15N46CHiwYk0ttHeMlNC4aKKWV5shKndBf6yr3eZ5AHDRqkBgKBRFEUVVEUzXA4HDh58mQQ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