Home > Software design >  When adding multiple toolbarGroup in react pdftron the name of the toolbar group changed to option.t
When adding multiple toolbarGroup in react pdftron the name of the toolbar group changed to option.t

Time:01-10

When adding multiple toolbarGroup using createToolbarGroup in react PDFTron the name of the toolbar group changed to option.toolbarGroup.toolbarGroup-AutoCount, option.toolbarGroup.toolbarGroup-Drop.

instance.UI.createToolbarGroup({
        name:'Drop',
        dataElementSuffix: "Drop",
        useDefaultElements: true,
        children: [
           { 
               type: "toolGroupButton",
               toolGroup: "freeHandTools",
               dataElement: "freeHandToolGroupButton",
               title: "Count",
            
             },
            {
              type: "toolButton",
              toolName: "AnnotationCreatePerimeterMeasurement",
              dataElement:"ellipseAreaToolGroupButton",
            },
            {
              type: "customElement",
              render:()=><Count name='points' count ={pointsCount} />,
              onClick: (e) => {
                   
              },
            },
        ]
    })

instance.UI.createToolbarGroup({
        name: "Auto Count",
        dataElementSuffix: "AutoCount",
        useDefaultElements: false,
        children: [
          { type: "spacer" },
          {
            type: "toolButton",
            dataElement:"ellipseAreaToolGroupButton",
            toolName: "AnnotationCreateRectangle2",
            onClick:async()=>{

screenshot URL (https://i.stack.imgur.com/OqMkf.png)

CodePudding user response:

Thank you for contacting us regarding Webviewer.

We were able to reproduce the issue on our end. I just made a change internally and it's being reviewed by one of my colleagues at this moment. I will update this ticket once it's merged and available for testing.

Thanks for your patience!

CodePudding user response:

The fix has been merged to our experimental build.

Please check the latest experimental build of Webviewer at https://www.pdftron.com/nightly/#experimental/2023-01-09/webviewer/.

You can download the build and give it a try. Please let us know if this resolve your issue, thank you.

  • Related