Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I want to to create a tooltip property for the shape widget which is available by default. I have changed the shape.ide.js and shape.runtime.js files available in Tomcat\webapps\Thingworx\Common\thingworx\widgets\shape with as attached. In shape.ide.js I have added 'supportsTooltip': true and Properties: 'ToolTipField': {
'description': TW.IDE.I18NController.translate('tw.button-ide.properties.label.description'),
'defaultValue': TW.IDE.I18NController.translate('tw.button-ide.properties.label.default-value'),
'baseType': 'STRING',
"isBindingTarget": true,
'isLocalizable': true
},
In shape.runtime.js I have added if (updatePropertyInfo.TargetProperty === 'ToolTipField') {
thisWidget.setProperty('ToolTipField', updatePropertyInfo.SinglePropertyValue);
} in updateProperty().
But my Shape widget is not showing Tooltip in the properties section of the widget when I put it in a mashup. Where am I getting wrong ?
Have you compared with other widgets that do have a tooltip ? Also, any errors in the application log or in the browser dev tools console?
I believe that it will not work like that.
Tthe better way would be to create your own widget based on the Shape Widget, and import it direcetly to ThingWorx as a new one.
Hi @soumya-hcl.
If one of the previous responses provided a solution, please mark it as the Accepted Solution for the benefit of others who may have the same question.
Regards.
--Sharon