textTool will not activate

Hi,

I am able to activate other tools like orthogonalLine and panTool, but the following does not activate the text tool:

            case 'textTool':
                diagram._clearSelection();
                diagram.deactivateTool();
                diagram.activateTool("textTool");
                break;

What am I doing wrong?

Thanks

Jim

3 Replies

SG Shyam G Syncfusion Team January 27, 2015 08:36 AM UTC

Hi Jim

Sorry for the delay

We have created a simple sample which meets your requirement and it is available in the below link for download. Please see the code snippet below.

Code snippet:

<input type="button" value="textTool" onclick="texttool()" />

$(window).load(function () {

            $("#Diagram1").ejDiagram({

          //initializing drawingtools

                drawingTools: { textTool: ej.datavisualization.Diagram.TextTool(), }

            });

        });

        function texttool() {            

            var diagram = $("#Diagram1").ejDiagram("instance");

            diagram.activateTool("textTool");

        }

Sample:http://www.syncfusion.com/downloads/support/directtrac/118051/texttool1380357665.zip

Please let me know if any concerns.

Regards,

Shyam G




JJ Jim Jacobs January 30, 2015 12:41 AM UTC

Hi Shyam,

Thanks, the code you provided works great.

Jim


SG Shyam G Syncfusion Team January 30, 2015 10:11 AM UTC

Hi Jim

Thanks for the update

Please let me know if you require further assistance on this.

Regards,

Shyam G



Loader.
Up arrow icon