How to disable status setting on annotation

Product:
webviewer

Product Version:
@pdftron/webviewer”: “^8.7.0”,

Please give a brief summary of your issue:
(Think of this as an email subject)
How to disable status setting on annotation

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

I want to disable status setting on annotation.
(by the conditions)

Comments were made by disableReplyForAnnotations API.
image

I want to status version of disableReplyForAnnotations API.

Please provide a link to a minimal sample where the issue is reproducible:
nothing.

1 Like

Hello okabe.yasufumi

You can disable “Status” button entirely by using following code sample:

instance.UI.disableElements([‘noteState’]) 

You can also disable individual, several or all data-elements inside the “Status” popup, by using the code sample below:

instance.UI.disableElements(['notePopupStateAccepted', 'notePopupStateRejected']) 

For more information please refer to: Apryse Documentation | Documentation
Or
Apryse WebViewer Namespace: UI

All the best,
Bojan

1 Like

Hello, Bojan

Thank you for your reply.
But what I want to know is how to programmatically control whether it is disabled or enabled.

Best Regard.

1 Like

instance.UI.disableElements is all annotation disabled.

Some annotations I want to disabled, some annotations I want to enabled.

1 Like

Hi okabe.yasufumi

I don’t think WV currently has API for that kind of behaviour. You may be able to do something with:

instance.UI.disableElements([‘notePopupState’])

and

instance.UI.enableElements([‘notePopupState’]) 

Depending on the comment selected you might be able to call enableElements API.
Otherway it might require some serious customizing of the UI, specifically here:

All the best,
Bojan

1 Like

Hi, Bojan.

I understand.

Thank you!

1 Like

instance.UI.disableElements([‘notePopupStateAccepted’, ‘notePopupStateRejected’]) is not working for me, I can see those options in status menu.
instance.UI.disableElements([‘noteState’]) this one is working.
Version: 11.2.0

I want add some custom options.

Can you please help me with this, thanks.

1 Like

Hi there,

With the changes to version 11+, the new modularUI may have different data-elements in our UI.
You can find the updated list here:

Please note that this topic is closed and we suggest creating a forum post if you have any further issues in the future.

Best regards,
Kevin

1 Like