{
  "draw2d": [
    {
      "type": "shape_designer.figure.PolyRect",
      "id": "c55dd135-15db-7c71-5efa-f6761c073e66",
      "x": 7980,
      "y": 7974.2235125,
      "width": 40,
      "height": 50,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "baseClass": "draw2d.SetFigure",
        "code": "/**\n * by 'Draw2D Shape Designer'\n *\n * Custom JS code to tweak the standard behaviour of the generated\n * shape. add your custome code and event handler here.\n *\n *\n */\ntestShape = testShape.extend({\n\n    init: function(attr, setter, getter){\n         this._super(attr, setter, getter);\n\n        this.attr({resizeable:false});\n        this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy());\n\n        this.last_t = false;\n    },\n    \n    calculate:function()\n    {\n        var t = this.getInputPort(\"input_t\").getValue();\n        \n        var q = this.getOutputPort(\"output_q\");\n        var q_ = this.getOutputPort(\"output_q_not\");\n        \n        var rising = this.last_t===false && t===true; \n        \n        if(rising===true){\n            var v = q.getValue();\n            q.setValue(!v);\n            q_.setValue(v)\n        }\n        this.last_t = t;\n    }\n});",
        "name": "Rectangle",
        "markdown": "# T-FlipFlop\n\n## Description\n\nThe D FlipFLop is widely used. It is also known as a \n*toggle*  flip-flop.\n\nA T flip-flop is a device which swaps or **toggles** state \nevery time it is triggered if the T input is asserted, \notherwise it holds the current output.\n\n\nThe toggle flip-flop is also a frequency divider."
      },
      "cssClass": "shape_designer_figure_PolyRect",
      "ports": [],
      "bgColor": "#FFFFFF",
      "color": "#303030",
      "stroke": 1,
      "radius": 1,
      "dasharray": null,
      "vertices": [
        {
          "x": 7980,
          "y": 7974.2235125
        },
        {
          "x": 8020,
          "y": 7974.2235125
        },
        {
          "x": 8020,
          "y": 8024.2235125
        },
        {
          "x": 7980,
          "y": 8024.2235125
        }
      ],
      "blur": 0,
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.SizeFilter"
        },
        {
          "name": "shape_designer.filter.StrokeFilter"
        },
        {
          "name": "shape_designer.filter.FillColorFilter"
        },
        {
          "name": "shape_designer.filter.RadiusFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtLabel",
      "id": "08459b5e-14e9-38d5-14dc-4b24f166cd2d",
      "x": 8002.78125,
      "y": 7973.7235125,
      "width": 28.328125,
      "height": 21.359375,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "Label"
      },
      "cssClass": "shape_designer_figure_ExtLabel",
      "ports": [],
      "bgColor": "none",
      "color": "#1B1B1B",
      "stroke": 0,
      "radius": 0,
      "dasharray": null,
      "text": "Q",
      "outlineStroke": 0,
      "outlineColor": "none",
      "fontSize": 10,
      "fontColor": "#080808",
      "fontFamily": null,
      "editor": "LabelInplaceEditor",
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FontSizeFilter"
        },
        {
          "name": "shape_designer.filter.FontColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtLabel",
      "id": "eada3849-d35d-7391-47aa-888a2469513d",
      "x": 8002.28125,
      "y": 8004.917112499999,
      "width": 28.328125,
      "height": 21.359375,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "Label"
      },
      "cssClass": "shape_designer_figure_ExtLabel",
      "ports": [],
      "bgColor": "none",
      "color": "#1B1B1B",
      "stroke": 0,
      "radius": 0,
      "dasharray": null,
      "text": "Q",
      "outlineStroke": 0,
      "outlineColor": "none",
      "fontSize": 10,
      "fontColor": "#080808",
      "fontFamily": null,
      "editor": "LabelInplaceEditor",
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.FontSizeFilter"
        },
        {
          "name": "shape_designer.filter.FontColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.PolyRect",
      "id": "0b5993de-527b-2309-20d4-4519d5414943",
      "x": 7980.5,
      "y": 7994.0945125,
      "width": 12.041999999999462,
      "height": 10.25799999999981,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "Rectangle"
      },
      "cssClass": "shape_designer_figure_PolyRect",
      "ports": [],
      "bgColor": "none",
      "color": "#303030",
      "stroke": 1,
      "radius": 0,
      "dasharray": null,
      "vertices": [
        {
          "x": 7980.5,
          "y": 7994.0945125
        },
        {
          "x": 7992.5419999999995,
          "y": 7999.000512499999
        },
        {
          "x": 7980.5,
          "y": 8004.3525125
        }
      ],
      "blur": 0,
      "filters": [
        {
          "name": "shape_designer.filter.PositionFilter"
        },
        {
          "name": "shape_designer.filter.SizeFilter"
        },
        {
          "name": "shape_designer.filter.StrokeFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtPort",
      "id": "7c8a6215-ce17-6a10-c85b-b97fd0de466c",
      "x": 8016.008125,
      "y": 7979.1135125,
      "width": 10,
      "height": 10,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "output_q",
        "type": "Output",
        "direction": 1
      },
      "cssClass": "shape_designer_figure_ExtPort",
      "ports": [],
      "bgColor": "#1C9BAB",
      "color": "#1B1B1B",
      "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"
        },
        {
          "name": "shape_designer.filter.FillColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtPort",
      "id": "078497de-04ae-57d8-a141-a3d4afacfe39",
      "x": 8016.008125,
      "y": 8010.6592,
      "width": 10,
      "height": 10,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "output_q_not",
        "type": "Output",
        "direction": 1
      },
      "cssClass": "shape_designer_figure_ExtPort",
      "ports": [],
      "bgColor": "#1C9BAB",
      "color": "#1B1B1B",
      "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"
        },
        {
          "name": "shape_designer.filter.FillColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtPort",
      "id": "5fc48f01-fecb-0d5f-ed4f-81a4bc26ae63",
      "x": 7972.51696,
      "y": 7994.2235125,
      "width": 10,
      "height": 10,
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "input_t",
        "type": "Input",
        "direction": 3
      },
      "cssClass": "shape_designer_figure_ExtPort",
      "ports": [],
      "bgColor": "#1C9BAB",
      "color": "#1B1B1B",
      "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"
        },
        {
          "name": "shape_designer.filter.FillColorFilter"
        }
      ]
    },
    {
      "type": "shape_designer.figure.ExtLine",
      "id": "75ad5ac1-3b3f-7d01-8f6b-95e175688076",
      "alpha": 1,
      "angle": 0,
      "userData": {
        "name": "Line"
      },
      "cssClass": "shape_designer_figure_ExtLine",
      "stroke": 1,
      "color": "#000000",
      "outlineStroke": 0,
      "outlineColor": "none",
      "policy": "draw2d.policy.line.VertexSelectionFeedbackPolicy",
      "vertex": [
        {
          "x": 8006.348,
          "y": 8009.721912499997
        },
        {
          "x": 8013.8748,
          "y": 8009.721912499997
        }
      ],
      "router": "draw2d.layout.connection.VertexRouter",
      "radius": "",
      "filters": [
        {
          "name": "shape_designer.filter.StrokeFilter"
        }
      ]
    }
  ],
  "image": "data:image/png;base64, "
}
