surveyjs / survey-creator

Scalable open-source survey software to generate dynamic JSON-driven forms within your JavaScript application. The form builder features a drag-and-drop UI, CSS Theme Editor, and GUI for conditional logic and form branching.
https://surveyjs.io/open-source
Other
863 stars 363 forks source link

Custom Adorner Documentation #1743

Open dcods22 opened 2 years ago

dcods22 commented 2 years ago

Are you requesting a feature, reporting a bug or ask a question?

I am wondering how I am supposed to handle the custom adorner? The example on the website shows 3 functions but does not document what they are supposed to do exactly. I assume getMarkerClass is used for indicating when the adorner should appear. I am unsure what getElementName exactly does and what I am supposed to return

I am also seeing inconsistent models being returned back for the getMarkerClass is this maybe because I am doing the wrong value for getElementName

I am trying to add a custom adorner on the question that when a specific property value is set that we will display text over the question on the SurveyCreator to let the user know this property is set.

Specify your

dcods22 commented 2 years ago

Specifically I am looking for an adorner to refresh when the property changes which I am only able to get to trigger when I move a question around but not after editing it

tsv2013 commented 2 years ago

Unfortunately our documentation related to adorners creation requires improvement. We're working on it.

But at the same time we're working on SurveyJS Creator V2. It uses native react and knockout approaches to render adorners as wrappers over components. I'd not recommend you to investigate much in adorners V1 because this code will not work in Creator V2.