From 1b8623b4cf3e5ddf8eb3e9a6fd38cb3982eeb94f Mon Sep 17 00:00:00 2001 From: Ahmed Abbas Date: Thu, 5 Dec 2019 15:50:20 +0200 Subject: rename ui project from client-franfurt to designer-client Issue-ID: CCSDK-1981 Signed-off-by: Ahmed Abbas Change-Id: Ic53ea9cf4a48d0ba60f91aa27960e05c77ae9b07 --- .../packages/designer/designer.component.ts | 128 --------------------- 1 file changed, 128 deletions(-) delete mode 100644 cds-ui/client-frankfurt/src/app/modules/feature-modules/packages/designer/designer.component.ts (limited to 'cds-ui/client-frankfurt/src/app/modules/feature-modules/packages/designer/designer.component.ts') diff --git a/cds-ui/client-frankfurt/src/app/modules/feature-modules/packages/designer/designer.component.ts b/cds-ui/client-frankfurt/src/app/modules/feature-modules/packages/designer/designer.component.ts deleted file mode 100644 index 547c1e574..000000000 --- a/cds-ui/client-frankfurt/src/app/modules/feature-modules/packages/designer/designer.component.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { Component, OnInit, ViewEncapsulation } from '@angular/core'; -import * as $ from 'jquery'; -import * as _ from 'lodash'; -import * as joint from '../../../../../../node_modules/jointjs/dist/joint.js'; - -@Component({ - selector: 'app-designer', - templateUrl: './designer.component.html', - styleUrls: ['./designer.component.css'], - encapsulation: ViewEncapsulation.None -}) -export class DesignerComponent implements OnInit { - - private controllerSideBar: boolean; - private attributesSideBar: boolean; - public graph: any; - public paper: any; - - constructor() { - this.controllerSideBar = true; - this.attributesSideBar = false; - } - private _toggleSidebar1() { - this.controllerSideBar = !this.controllerSideBar; - } - private _toggleSidebar2() { - this.attributesSideBar = !this.attributesSideBar; - } - - - ngOnInit() { - this.attachEditorBarToCanvas(); - } - - attachEditorBarToCanvas() { - this.graph = new joint.dia.Graph, - this.paper = new joint.dia.Paper({ - el: $('#paper'), - model: this.graph, - height: 720, - width: 1200, - gridSize: 2, - drawGrid: true, - cellViewNamespace: joint.shapes - }); - - this.paper.setGrid({ - name: 'dot', - args: - { color: 'black', thickness: 2, scaleFactor: 8 } - - }).drawGrid(); - - - joint.shapes["html"] = {}; - joint.shapes["html"].Element = joint.shapes.basic.Rect.extend({ - defaults: joint.util.deepSupplement({ - type: 'html.Element' - }, joint.shapes.basic.Rect.prototype.defaults) - }); - - joint.shapes["html"].ElementView = joint.dia.ElementView.extend({ - - template: [ - '
', - '
', - '
', - '', - '', - '
', - '
', - '', - '', - '', - '
', - '
', - '', - '', - '
', - '
', - '
' - ].join(''), - - initialize: function() { - _.bindAll(this, 'updateBox'); - joint.dia.ElementView.prototype.initialize.apply(this, arguments); - - this.$box = $(_.template(this.template)()); - // Prevent paper from handling pointerdown. - this.$box.find('input,select').on('mousedown click', function(evt) { - evt.stopPropagation(); - }); - this.model.on('change', this.updateBox, this); - - this.updateBox(); - }, - render: function() { - joint.dia.ElementView.prototype.render.apply(this, arguments); - this.paper.$el.prepend(this.$box); - this.updateBox(); - return this; - }, - updateBox: function() { - // Set the position and dimension of the box so that it covers the JointJS element. - var bbox = this.model.getBBox(); - this.$box.css({ - width: bbox.width, - height: bbox.height, - left: bbox.x, - top: bbox.y, - transform: 'rotate(' + (this.model.get('angle') || 0) + 'deg)' - }); - } - }); - - var el1 = new joint.shapes["html"].Element({}); - this.graph.addCells([el1]); - } - -} -- cgit 1.2.3-korg