1/** 2 * $Id: mxPidInstruments.js,v 1.4 2014/01/21 13:10:17 gaudenz Exp $ 3 * Copyright (c) 2006-2013, JGraph Ltd 4 */ 5 6//********************************************************************************************************************************************************** 7//Discrete Instrument 8//********************************************************************************************************************************************************** 9/** 10 * Extends mxShape. 11 */ 12function mxShapePidDiscInst(bounds, fill, stroke, strokewidth) 13{ 14 mxShape.call(this); 15 this.bounds = bounds; 16 this.fill = fill; 17 this.stroke = stroke; 18 this.strokewidth = (strokewidth != null) ? strokewidth : 1; 19}; 20 21/** 22 * Extends mxShape. 23 */ 24mxUtils.extend(mxShapePidDiscInst, mxShape); 25 26mxShapePidDiscInst.prototype.cst = { 27 SHAPE_DISC_INST : 'mxgraph.pid2inst.discInst', 28 MOUNTING : 'mounting', 29 FIELD : 'field', 30 ROOM : 'room', 31 INACCESSIBLE : 'inaccessible', 32 LOCAL : 'local' 33}; 34 35mxShapePidDiscInst.prototype.customProperties = [ 36 {name: 'mounting', dispName: 'Mounting', type: 'enum', defVal:'field', 37 enumList: [ 38 {val:'field', dispName:'Field'}, 39 {val:'room', dispName:'Room'}, 40 {val:'inaccessible', dispName:'Inaccessible'}, 41 {val:'local', dispName:'Local'} 42 ]} 43]; 44 45/** 46 * Function: paintVertexShape 47 * 48 * Paints the vertex shape. 49 */ 50mxShapePidDiscInst.prototype.paintVertexShape = function(c, x, y, w, h) 51{ 52 c.translate(x, y); 53 this.background(c, x, y, w, h); 54 c.setShadow(false); 55 this.foreground(c, x, y, w, h); 56}; 57 58mxShapePidDiscInst.prototype.background = function(c, x, y, w, h) 59{ 60 c.ellipse(0, 0, w, h); 61 c.fillAndStroke(); 62}; 63 64mxShapePidDiscInst.prototype.foreground = function(c, x, y, w, h) 65{ 66 var mounting = mxUtils.getValue(this.style, mxShapePidDiscInst.prototype.cst.MOUNTING, 'field'); 67 68 if (mounting === mxShapePidDiscInst.prototype.cst.ROOM) 69 { 70 c.begin(); 71 c.moveTo(0, h * 0.5); 72 c.lineTo(w, h * 0.5); 73 c.stroke(); 74 } 75 else if (mounting === mxShapePidDiscInst.prototype.cst.INACCESSIBLE) 76 { 77 c.setDashed(true); 78 c.begin(); 79 c.moveTo(0, h * 0.5); 80 c.lineTo(w, h * 0.5); 81 c.stroke(); 82 } 83 else if (mounting === mxShapePidDiscInst.prototype.cst.LOCAL) 84 { 85 c.begin(); 86 c.moveTo(w * 0.005, h * 0.48); 87 c.lineTo(w * 0.995, h * 0.48); 88 c.moveTo(w * 0.005, h * 0.52); 89 c.lineTo(w * 0.995, h * 0.52); 90 c.stroke(); 91 } 92}; 93 94mxCellRenderer.registerShape(mxShapePidDiscInst.prototype.cst.SHAPE_DISC_INST, mxShapePidDiscInst); 95 96mxShapePidDiscInst.prototype.constraints = [ 97 new mxConnectionConstraint(new mxPoint(0.5, 0), true), 98 new mxConnectionConstraint(new mxPoint(0.5, 1), true), 99 new mxConnectionConstraint(new mxPoint(0, 0.5), true), 100 new mxConnectionConstraint(new mxPoint(1, 0.5), true), 101 new mxConnectionConstraint(new mxPoint(0.145, 0.145), false), 102 new mxConnectionConstraint(new mxPoint(0.145, 0.855), false), 103 new mxConnectionConstraint(new mxPoint(0.855, 0.145), false), 104 new mxConnectionConstraint(new mxPoint(0.855, 0.855), false) 105 ]; 106 107//********************************************************************************************************************************************************** 108//Shared Control/Display 109//********************************************************************************************************************************************************** 110/** 111* Extends mxShape. 112*/ 113function mxShapePidSharedCont(bounds, fill, stroke, strokewidth) 114{ 115 mxShape.call(this); 116 this.bounds = bounds; 117 this.fill = fill; 118 this.stroke = stroke; 119 this.strokewidth = (strokewidth != null) ? strokewidth : 1; 120}; 121 122/** 123* Extends mxShape. 124*/ 125mxUtils.extend(mxShapePidSharedCont, mxShape); 126 127mxShapePidSharedCont.prototype.cst = { 128 SHAPE_SHARED_CONT : 'mxgraph.pid2inst.sharedCont', 129 MOUNTING : 'mounting', 130 FIELD : 'field', 131 ROOM : 'room', 132 INACCESSIBLE : 'inaccessible', 133 LOCAL : 'local' 134}; 135 136mxShapePidSharedCont.prototype.customProperties = [ 137 {name: 'mounting', dispName: 'Mounting', type: 'enum', defVal:'field', 138 enumList: [ 139 {val:'field', dispName:'Field'}, 140 {val:'room', dispName:'Room'}, 141 {val:'inaccessible', dispName:'Inaccessible'}, 142 {val:'local', dispName:'Local'} 143 ]} 144]; 145 146/** 147* Function: paintVertexShape 148* 149* Paints the vertex shape. 150*/ 151mxShapePidSharedCont.prototype.paintVertexShape = function(c, x, y, w, h) 152{ 153 c.translate(x, y); 154 this.background(c, x, y, w, h); 155 c.setShadow(false); 156 this.foreground(c, x, y, w, h); 157}; 158 159mxShapePidSharedCont.prototype.background = function(c, x, y, w, h) 160{ 161 c.rect(0, 0, w, h); 162 c.fillAndStroke(); 163}; 164 165mxShapePidSharedCont.prototype.foreground = function(c, x, y, w, h) 166{ 167 var mounting = mxUtils.getValue(this.style, mxShapePidSharedCont.prototype.cst.MOUNTING, 'field'); 168 169 c.ellipse(0, 0, w, h); 170 c.fillAndStroke(); 171 172 if (mounting === mxShapePidSharedCont.prototype.cst.ROOM) 173 { 174 c.begin(); 175 c.moveTo(0, h * 0.5); 176 c.lineTo(w, h * 0.5); 177 c.stroke(); 178 } 179 else if (mounting === mxShapePidSharedCont.prototype.cst.INACCESSIBLE) 180 { 181 c.setDashed(true); 182 c.begin(); 183 c.moveTo(0, h * 0.5); 184 c.lineTo(w, h * 0.5); 185 c.stroke(); 186 } 187 else if (mounting === mxShapePidDiscInst.prototype.cst.LOCAL) 188 { 189 c.begin(); 190 c.moveTo(w * 0.005, h * 0.48); 191 c.lineTo(w * 0.995, h * 0.48); 192 c.moveTo(w * 0.005, h * 0.52); 193 c.lineTo(w * 0.995, h * 0.52); 194 c.stroke(); 195 } 196}; 197 198mxCellRenderer.registerShape(mxShapePidSharedCont.prototype.cst.SHAPE_SHARED_CONT, mxShapePidSharedCont); 199 200mxShapePidSharedCont.prototype.constraints = [ 201 new mxConnectionConstraint(new mxPoint(0.5, 0), true), 202 new mxConnectionConstraint(new mxPoint(0.5, 1), true), 203 new mxConnectionConstraint(new mxPoint(0, 0.5), true), 204 new mxConnectionConstraint(new mxPoint(1, 0.5), true), 205 new mxConnectionConstraint(new mxPoint(0, 0), false), 206 new mxConnectionConstraint(new mxPoint(0, 1), false), 207 new mxConnectionConstraint(new mxPoint(1, 0), false), 208 new mxConnectionConstraint(new mxPoint(1, 1), false) 209 ]; 210 211//********************************************************************************************************************************************************** 212//Computer Function 213//********************************************************************************************************************************************************** 214/** 215* Extends mxShape. 216*/ 217function mxShapePidCompFunc(bounds, fill, stroke, strokewidth) 218{ 219 mxShape.call(this); 220 this.bounds = bounds; 221 this.fill = fill; 222 this.stroke = stroke; 223 this.strokewidth = (strokewidth != null) ? strokewidth : 1; 224}; 225 226/** 227* Extends mxShape. 228*/ 229mxUtils.extend(mxShapePidCompFunc, mxShape); 230 231mxShapePidCompFunc.prototype.cst = { 232 SHAPE_COMP_FUNC : 'mxgraph.pid2inst.compFunc', 233 MOUNTING : 'mounting', 234 FIELD : 'field', 235 ROOM : 'room', 236 INACCESSIBLE : 'inaccessible', 237 LOCAL : 'local' 238}; 239 240mxShapePidCompFunc.prototype.customProperties = [ 241 {name: 'mounting', dispName: 'Mounting', type: 'enum', defVal:'field', 242 enumList: [ 243 {val:'field', dispName:'Field'}, 244 {val:'room', dispName:'Room'}, 245 {val:'inaccessible', dispName:'Inaccessible'}, 246 {val:'local', dispName:'Local'} 247 ]} 248]; 249 250/** 251* Function: paintVertexShape 252* 253* Paints the vertex shape. 254*/ 255mxShapePidCompFunc.prototype.paintVertexShape = function(c, x, y, w, h) 256{ 257 c.translate(x, y); 258 this.background(c, x, y, w, h); 259 c.setShadow(false); 260 this.foreground(c, x, y, w, h); 261}; 262 263mxShapePidCompFunc.prototype.background = function(c, x, y, w, h) 264{ 265 c.begin(); 266 c.moveTo(0, h * 0.5); 267 c.lineTo(w * 0.25, 0); 268 c.lineTo(w * 0.75, 0); 269 c.lineTo(w, h * 0.5); 270 c.lineTo(w * 0.75, h); 271 c.lineTo(w * 0.25, h); 272 c.close(); 273 c.fillAndStroke(); 274}; 275 276mxShapePidCompFunc.prototype.foreground = function(c, x, y, w, h) 277{ 278 var mounting = mxUtils.getValue(this.style, mxShapePidCompFunc.prototype.cst.MOUNTING, 'field'); 279 280 if (mounting === mxShapePidCompFunc.prototype.cst.ROOM) 281 { 282 c.begin(); 283 c.moveTo(0, h * 0.5); 284 c.lineTo(w, h * 0.5); 285 c.stroke(); 286 } 287 else if (mounting === mxShapePidCompFunc.prototype.cst.INACCESSIBLE) 288 { 289 c.setDashed(true); 290 c.begin(); 291 c.moveTo(0, h * 0.5); 292 c.lineTo(w, h * 0.5); 293 c.stroke(); 294 } 295 else if (mounting === mxShapePidDiscInst.prototype.cst.LOCAL) 296 { 297 c.begin(); 298 c.moveTo(w * 0.01, h * 0.48); 299 c.lineTo(w * 0.99, h * 0.48); 300 c.moveTo(w * 0.01, h * 0.52); 301 c.lineTo(w * 0.99, h * 0.52); 302 c.stroke(); 303 } 304}; 305 306mxCellRenderer.registerShape(mxShapePidCompFunc.prototype.cst.SHAPE_COMP_FUNC, mxShapePidCompFunc); 307 308mxShapePidCompFunc.prototype.constraints = [ 309 new mxConnectionConstraint(new mxPoint(0.5, 0), true), 310 new mxConnectionConstraint(new mxPoint(0.5, 1), true), 311 new mxConnectionConstraint(new mxPoint(0, 0.5), true), 312 new mxConnectionConstraint(new mxPoint(1, 0.5), true), 313 new mxConnectionConstraint(new mxPoint(0.25, 0), false), 314 new mxConnectionConstraint(new mxPoint(0.75, 0), false), 315 new mxConnectionConstraint(new mxPoint(0.25, 1), false), 316 new mxConnectionConstraint(new mxPoint(0.75, 1), false) 317 ]; 318 319//********************************************************************************************************************************************************** 320//Computer Function 321//********************************************************************************************************************************************************** 322/** 323* Extends mxShape. 324*/ 325function mxShapePidProgLogCont(bounds, fill, stroke, strokewidth) 326{ 327 mxShape.call(this); 328 this.bounds = bounds; 329 this.fill = fill; 330 this.stroke = stroke; 331 this.strokewidth = (strokewidth != null) ? strokewidth : 1; 332}; 333 334/** 335* Extends mxShape. 336*/ 337mxUtils.extend(mxShapePidProgLogCont, mxShape); 338 339mxShapePidProgLogCont.prototype.cst = { 340 SHAPE_PROG_LOG_CONT : 'mxgraph.pid2inst.progLogCont', 341 MOUNTING : 'mounting', 342 FIELD : 'field', 343 ROOM : 'room', 344 INACCESSIBLE : 'inaccessible', 345 LOCAL : 'local' 346}; 347 348mxShapePidProgLogCont.prototype.customProperties = [ 349 {name: 'mounting', dispName: 'Mounting', type: 'enum', defVal:'field', 350 enumList: [ 351 {val:'field', dispName:'Field'}, 352 {val:'room', dispName:'Room'}, 353 {val:'inaccessible', dispName:'Inaccessible'}, 354 {val:'local', dispName:'Local'} 355 ]} 356]; 357 358/** 359* Function: paintVertexShape 360* 361* Paints the vertex shape. 362*/ 363mxShapePidProgLogCont.prototype.paintVertexShape = function(c, x, y, w, h) 364{ 365 c.translate(x, y); 366 this.background(c, x, y, w, h); 367 c.setShadow(false); 368 this.foreground(c, x, y, w, h); 369}; 370 371mxShapePidProgLogCont.prototype.background = function(c, x, y, w, h) 372{ 373 c.rect(0, 0, w, h); 374 c.fillAndStroke(); 375}; 376 377mxShapePidProgLogCont.prototype.foreground = function(c, x, y, w, h) 378{ 379 var mounting = mxUtils.getValue(this.style, mxShapePidProgLogCont.prototype.cst.MOUNTING, 'field'); 380 381 c.begin(); 382 c.moveTo(0, h * 0.5); 383 c.lineTo(w * 0.5, 0); 384 c.lineTo(w, h * 0.5); 385 c.lineTo(w * 0.5, h); 386 c.close(); 387 c.stroke(); 388 389 if (mounting === mxShapePidProgLogCont.prototype.cst.ROOM) 390 { 391 c.begin(); 392 c.moveTo(0, h * 0.5); 393 c.lineTo(w, h * 0.5); 394 c.stroke(); 395 } 396 else if (mounting === mxShapePidProgLogCont.prototype.cst.INACCESSIBLE) 397 { 398 c.setDashed(true); 399 c.begin(); 400 c.moveTo(0, h * 0.5); 401 c.lineTo(w, h * 0.5); 402 c.stroke(); 403 } 404 else if (mounting === mxShapePidDiscInst.prototype.cst.LOCAL) 405 { 406 c.begin(); 407 c.moveTo(w * 0.02, h * 0.48); 408 c.lineTo(w * 0.98, h * 0.48); 409 c.moveTo(w * 0.02, h * 0.52); 410 c.lineTo(w * 0.98, h * 0.52); 411 c.stroke(); 412 } 413}; 414 415mxCellRenderer.registerShape(mxShapePidProgLogCont.prototype.cst.SHAPE_PROG_LOG_CONT, mxShapePidProgLogCont); 416 417mxShapePidProgLogCont.prototype.constraints = [ 418 new mxConnectionConstraint(new mxPoint(0.5, 0), true), 419 new mxConnectionConstraint(new mxPoint(0.5, 1), true), 420 new mxConnectionConstraint(new mxPoint(0, 0.5), true), 421 new mxConnectionConstraint(new mxPoint(1, 0.5), true), 422 new mxConnectionConstraint(new mxPoint(0, 0), false), 423 new mxConnectionConstraint(new mxPoint(0, 1), false), 424 new mxConnectionConstraint(new mxPoint(1, 0), false), 425 new mxConnectionConstraint(new mxPoint(1, 1), false) 426 ]; 427 428//********************************************************************************************************************************************************** 429//Indicator 430//********************************************************************************************************************************************************** 431/** 432* Extends mxShape. 433*/ 434function mxShapePidIndicator(bounds, fill, stroke, strokewidth) 435{ 436 mxShape.call(this); 437 this.bounds = bounds; 438 this.fill = fill; 439 this.stroke = stroke; 440 this.strokewidth = (strokewidth != null) ? strokewidth : 1; 441}; 442 443/** 444* Extends mxShape. 445*/ 446mxUtils.extend(mxShapePidIndicator, mxShape); 447 448mxShapePidIndicator.prototype.cst = { 449 SHAPE_INDICATOR : 'mxgraph.pid2inst.indicator', 450 MOUNTING : 'mounting', 451 FIELD : 'field', 452 ROOM : 'room', 453 INACCESSIBLE : 'inaccessible', 454 LOCAL : 'local', 455 IND_TYPE : 'indType', 456 INSTRUMENT : 'inst', 457 CONTROL : 'ctrl', 458 FUNCTION : 'func', 459 PLC : 'plc' 460}; 461 462mxShapePidIndicator.prototype.customProperties = [ 463 {name: 'mounting', dispName: 'Mounting', type: 'enum', defVal:'field', 464 enumList: [ 465 {val:'field', dispName:'Field'}, 466 {val:'room', dispName:'Room'}, 467 {val:'inaccessible', dispName:'Inaccessible'}, 468 {val:'local', dispName:'Local'} 469 ]}, 470 {name: 'indType', dispName: 'Type', type: 'enum', defVal:'inst', 471 enumList: [ 472 {val:'inst', dispName:'Instrument'}, 473 {val:'ctrl', dispName:'Control'}, 474 {val:'func', dispName:'Function'}, 475 {val:'plc', dispName:'PLC'} 476 ]} 477]; 478 479/** 480* Function: paintVertexShape 481* 482* Paints the vertex shape. 483*/ 484mxShapePidIndicator.prototype.paintVertexShape = function(c, x, y, w, h) 485{ 486 c.translate(x, y); 487 this.background(c, x, y, w, h); 488 c.setShadow(false); 489 this.foreground(c, x, y, w, h); 490}; 491 492mxShapePidIndicator.prototype.background = function(c, x, y, w, h) 493{ 494 var type = mxUtils.getValue(this.style, mxShapePidIndicator.prototype.cst.IND_TYPE, 'inst'); 495 496 c.begin(); 497 c.moveTo(w * 0.5, w); 498 c.lineTo(w * 0.5, h); 499 c.stroke(); 500 501 if (type === mxShapePidIndicator.prototype.cst.INSTRUMENT) 502 { 503 c.ellipse(0, 0, w, w); 504 c.fillAndStroke(); 505 } 506 else if (type === mxShapePidIndicator.prototype.cst.CONTROL) 507 { 508 c.rect(0, 0, w, w); 509 c.fillAndStroke(); 510 } 511 else if (type === mxShapePidIndicator.prototype.cst.FUNCTION) 512 { 513 c.begin(); 514 c.moveTo(0, w * 0.5); 515 c.lineTo(w * 0.25, 0); 516 c.lineTo(w * 0.75, 0); 517 c.lineTo(w, w * 0.5); 518 c.lineTo(w * 0.75, w); 519 c.lineTo(w * 0.25, w); 520 c.close(); 521 c.fillAndStroke(); 522 } 523 else if (type === mxShapePidIndicator.prototype.cst.PLC) 524 { 525 c.rect(0, 0, w, w); 526 c.fillAndStroke(); 527 } 528}; 529 530mxShapePidIndicator.prototype.foreground = function(c, x, y, w, h) 531{ 532 var mounting = mxUtils.getValue(this.style, mxShapePidIndicator.prototype.cst.MOUNTING, 'field'); 533 var type = mxUtils.getValue(this.style, mxShapePidIndicator.prototype.cst.IND_TYPE, 'inst'); 534 535 if (type === mxShapePidIndicator.prototype.cst.CONTROL) 536 { 537 c.ellipse(0, 0, w, w); 538 c.stroke(); 539 } 540 else if (type === mxShapePidIndicator.prototype.cst.PLC) 541 { 542 c.begin(); 543 c.moveTo(0, w * 0.5); 544 c.lineTo(w * 0.5, 0); 545 c.lineTo(w, w * 0.5); 546 c.lineTo(w * 0.5, w); 547 c.close(); 548 c.stroke(); 549 } 550 551 if (mounting === mxShapePidIndicator.prototype.cst.ROOM) 552 { 553 c.begin(); 554 c.moveTo(0, w * 0.5); 555 c.lineTo(w, w * 0.5); 556 c.stroke(); 557 } 558 else if (mounting === mxShapePidIndicator.prototype.cst.INACCESSIBLE) 559 { 560 c.setDashed(true); 561 c.begin(); 562 c.moveTo(0, w * 0.5); 563 c.lineTo(w, w * 0.5); 564 c.stroke(); 565 } 566 else if (mounting === mxShapePidIndicator.prototype.cst.LOCAL) 567 { 568 c.begin(); 569 c.moveTo(w * 0.005, w * 0.48); 570 c.lineTo(w * 0.995, w * 0.48); 571 c.moveTo(w * 0.005, w * 0.52); 572 c.lineTo(w * 0.995, w * 0.52); 573 c.stroke(); 574 } 575}; 576 577mxCellRenderer.registerShape(mxShapePidIndicator.prototype.cst.SHAPE_INDICATOR, mxShapePidIndicator); 578 579mxShapePidIndicator.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 1), true)]; 580 581//********************************************************************************************************************************************************** 582//Logic 583//********************************************************************************************************************************************************** 584/** 585* Extends mxShape. 586*/ 587function mxShapePidLogic(bounds, fill, stroke, strokewidth) 588{ 589 mxShape.call(this); 590 this.bounds = bounds; 591 this.fill = fill; 592 this.stroke = stroke; 593 this.strokewidth = (strokewidth != null) ? strokewidth : 1; 594}; 595 596/** 597* Extends mxShape. 598*/ 599mxUtils.extend(mxShapePidLogic, mxShape); 600 601mxShapePidLogic.prototype.cst = { 602 SHAPE_LOGIC : 'mxgraph.pid2inst.logic', 603 MOUNTING : 'mounting', 604 FIELD : 'field', 605 ROOM : 'room', 606 INACCESSIBLE : 'inaccessible', 607 LOCAL : 'local' 608}; 609 610mxShapePidLogic.prototype.customProperties = [ 611 {name: 'mounting', dispName: 'Mounting', type: 'enum', defVal:'field', 612 enumList: [ 613 {val:'field', dispName:'Field'}, 614 {val:'room', dispName:'Room'}, 615 {val:'inaccessible', dispName:'Inaccessible'}, 616 {val:'local', dispName:'Local'} 617 ]} 618]; 619 620/** 621* Function: paintVertexShape 622* 623* Paints the vertex shape. 624*/ 625mxShapePidLogic.prototype.paintVertexShape = function(c, x, y, w, h) 626{ 627 c.translate(x, y); 628 this.background(c, x, y, w, h); 629 c.setShadow(false); 630 this.foreground(c, x, y, w, h); 631}; 632 633mxShapePidLogic.prototype.background = function(c, x, y, w, h) 634{ 635 c.begin(); 636 c.moveTo(0, h * 0.5); 637 c.lineTo(w * 0.5, 0); 638 c.lineTo(w, h * 0.5); 639 c.lineTo(w * 0.5, h); 640 c.close(); 641 c.fillAndStroke(); 642}; 643 644mxShapePidLogic.prototype.foreground = function(c, x, y, w, h) 645{ 646 var mounting = mxUtils.getValue(this.style, mxShapePidLogic.prototype.cst.MOUNTING, 'field'); 647 648 if (mounting === mxShapePidLogic.prototype.cst.ROOM) 649 { 650 c.begin(); 651 c.moveTo(0, h * 0.5); 652 c.lineTo(w, h * 0.5); 653 c.stroke(); 654 } 655 else if (mounting === mxShapePidLogic.prototype.cst.INACCESSIBLE) 656 { 657 c.setDashed(true); 658 c.begin(); 659 c.moveTo(0, h * 0.5); 660 c.lineTo(w, h * 0.5); 661 c.stroke(); 662 } 663 else if (mounting === mxShapePidLogic.prototype.cst.LOCAL) 664 { 665 c.begin(); 666 c.moveTo(w * 0.02, h * 0.48); 667 c.lineTo(w * 0.98, h * 0.48); 668 c.moveTo(w * 0.02, h * 0.52); 669 c.lineTo(w * 0.98, h * 0.52); 670 c.stroke(); 671 } 672}; 673 674mxCellRenderer.registerShape(mxShapePidLogic.prototype.cst.SHAPE_LOGIC, mxShapePidLogic); 675 676mxShapePidLogic.prototype.constraints = [ 677 new mxConnectionConstraint(new mxPoint(0.5, 0), true), 678 new mxConnectionConstraint(new mxPoint(0.5, 1), true), 679 new mxConnectionConstraint(new mxPoint(0, 0.5), true), 680 new mxConnectionConstraint(new mxPoint(1, 0.5), true), 681 new mxConnectionConstraint(new mxPoint(0.25, 0.25), false), 682 new mxConnectionConstraint(new mxPoint(0.25, 0.75), false), 683 new mxConnectionConstraint(new mxPoint(0.75, 0.25), false), 684 new mxConnectionConstraint(new mxPoint(0.75, 0.75), false) 685 ]; 686