clientIO / JointJS_plus

JointJS+ support
4 stars 9 forks source link

OpenAsPNG don't work when I use some custom Link #36

Closed luicaps closed 9 years ago

luicaps commented 10 years ago

Hi,

I implemented a Link extending joint.dia.Link.extend, also based on joint.shapes.bpmn.Flow.

What happens is that when I call openAsPNG function on Firefox it works fine, but when this link is in the model, nothing appears. Also openAsSVG works all right with the link.

Am I missing something? I'll post the code bellow.

Thanks.

joint.shapes.molic.Link = joint.dia.Link.extend({ defaults: { type: "molic.Link", attrs: { '.marker-source': { d: 'M 0 0' }, '.marker-target': { d: 'M 10 0 L 0 5 L 10 10 z', fill: '#000000' }, '.connection': { 'stroke-dasharray': ' ', 'stroke-width': 1 }, '.connection-wrap': { style: '', onMouseOver: '', onMouseOut: '' } }, flowType: "Transição", speakTransition: "u: Speak \n Transition" }, initialize: function() { joint.dia.Link.prototype.initialize.apply(this, arguments); this.listenTo(this, 'change:flowType', this.onFlowTypeChange); this.listenTo(this, 'change:speakTransition', this.onSpeakTransitionChange); this.onFlowTypeChange(this, this.get('flowType')); this.onSpeakTransitionChange(); }, onSpeakTransitionChange: function() { this.set('labels', [{ position: .5, attrs: { text: {text: this.get('speakTransition') }}}]); }, onFlowTypeChange: function(cell, type) { var attrs; switch (type) { case 'Transição': attrs = {}; break; case 'Ruptura': attrs = { '.marker-target': { d: 'M 10 0 L 0 5 L 10 10 z', fill: '#000' }, '.connection': { 'stroke-dasharray': '4,4' } }; break; default: throw "Link: Unknown Link Type: " + type; } cell.attr(_.merge({}, this.defaults.attrs, attrs)); } });

DavidDurman commented 9 years ago

Is this still happening also in Rappid v1.4?

kumilingus commented 9 years ago

Closed as the reporter not being responsive and the issue can not be reproduced by us. Feel free to reopen if the issue still persist.