Compare commits

..

2 Commits
master ... dev

Author SHA1 Message Date
bc23ac7d9e fix tags field count 2020-09-15 23:53:54 +08:00
e89a166354 hide context menu 2020-09-15 10:05:22 +08:00
2 changed files with 25 additions and 20 deletions

View File

@ -4,7 +4,9 @@
"displayNameKey": "roles-urls-displayName",
"name": "urls",
"kind": "Grouping",
"requiredTypes": [{ "text": true }],
"requiredTypes": [{
"text": true
}],
"description": "Urls of pictures, example: 'http://www.example.com/xx.png'",
"descriptionKey": "roles-urls-description"
},
@ -13,7 +15,9 @@
"displayNameKey": "roles-tags-displayName",
"name": "tags",
"kind": "Grouping",
"requiredTypes": [{ "text": true }],
"requiredTypes": [{
"text": true
}],
"description": "text to be displayed with pictures",
"descriptionKey": "roles-tags-description"
}
@ -102,14 +106,16 @@
"position": {
"type": {
"enumeration": [{
"displayName": "above",
"displayNameKey": "objects-tag-position-enumeration-above-displayName",
"value": "above"
}, {
"displayName": "bottom",
"displayNameKey": "objects-tag-position-enumeration-bottom-displayName",
"value": "bottom"
}]
"displayName": "above",
"displayNameKey": "objects-tag-position-enumeration-above-displayName",
"value": "above"
},
{
"displayName": "bottom",
"displayNameKey": "objects-tag-position-enumeration-bottom-displayName",
"value": "bottom"
}
]
}
},
"fontColor": {
@ -140,8 +146,7 @@
"max": 1,
"kind": "Grouping"
},
"tag": {
"min": 0,
"tags": {
"max": 1,
"kind": "Grouping"
}

View File

@ -57,14 +57,14 @@ export class Visual implements IVisual {
this.container = options.element;
this.host=options.host;
this.selectionManager=this.host.createSelectionManager();
// d3.select(this.container).on("contextmenu", () => {
// const mouseEvent: MouseEvent = <MouseEvent>d3.event;
// this.selectionManager.showContextMenu({}, {
// x: mouseEvent.clientX,
// y: mouseEvent.clientY
// });
// mouseEvent.preventDefault();
// });
d3.select(this.container).on("contextmenu", () => {
const mouseEvent: MouseEvent = <MouseEvent>d3.event;
this.selectionManager.showContextMenu({}, {
x: mouseEvent.clientX,
y: mouseEvent.clientY
});
mouseEvent.preventDefault();
});
}
private initial() {
if (this.innerContainer) {