Hello,
So far, the <select/> tag exists in the DOM as can be seen in the chrome dev tools, but it doesn't show up anywhere, has no height or width.
I tried appending the <select/> tag to the rendered <image/> tag, but that didn't work either.
It doesn't have to be a <select/> tag necessarily, but I do want the dropdown menu capability. Something that is within the basic <rect/> shape, next to the rendered <image/>.
Here is my code:
joint.shapes.basic.DecoratedMasterSound = joint.shapes.basic.Generic.extend({
markup: '<g class="rotatable"><g class="scalable"><rect/></g><div/><image class="speakers" /><select class="select" /></g>',
defaults: joint.util.deepSupplement({
type: 'basic.DecoratedMasterSound',
size: { width: 100, height: 60 },
attrs: {
'rect': { fill: '#FFFFFF', stroke: 'black', 'stroke-width': 5, 'rx': 2, 'ry': 2, width: 100, height: 60 },
}
}, joint.shapes.basic.Generic.prototype.defaults)
});
var decoratedMasterSound = new joint.shapes.basic.DecoratedMasterSound({
position: { x: 300, y: 120 },
size: { width: 100, height: 100 },
attrs: {
image: { height: 50, width: 50 },
cogniType: 'sound',
'.speakers': {
'xlink:href': 'assets/speakers.jpg'
},
'.select': {
'background-color': 'red',
'border': 'solid 1px'
}
}
});
*Red Text: The parts that I tried to force to work, but failed.
Thanks,
Eric