Dimension

8 Jun 20172 minutes to read

You can customize Radial Menu dimension by using radius and position properties.

Radius

You can customize the Radial Menu size by using the radius property. By default, the Radial Menu radius is set as 150px. Refer to the following code example.

  • HTML
  • <ej-radialmenu id="defaultradialmenu"  backImageClass= "backimageclass" targetElementId= "radialtarget1" (click)="onItemClick($event)" [radius]="radius">
        <e-items>
            <e-item imageUrl="http://js.syncfusion.com/demos/web/content/images/RadialMenu/font.png" text="Bold" ></e-item>
            <e-item imageUrl="http://js.syncfusion.com/demos/web/content/images/RadialMenu/f1.png" text="Italic" ></e-item>
            <e-item imageUrl="http://js.syncfusion.com/demos/web/content/images/RadialMenu/redo.png" text="Redo" ></e-item>
            <e-item imageUrl="http://js.syncfusion.com/demos/web/content/images/RadialMenu/undo.png" text="Undo" ></e-item>
        </e-items>
        </ej-radialmenu>

    Define radius value in constructor file.

  • JAVASCRIPT
  • export class AppComponent {    
        radius:any;
        constructor() {    
    	this.radius=200;  
        }

    The following screenshot illustrates the Radial Menu while clicking on the settings icon.

    Selecting text in the page

    The following screenshot illustrates the Radial Menu while clicking on the settings icon.

    Position

    To display the Radial Menu in the web page in a specific area, we can use the position property. By default, the Radial Menu position is set as null.

    Refer to the following code example.

    In the HTML page set the position value to the RadialMenu component.

  • HTML
  • <ej-radialmenu id="defaultradialmenu"  backImageClass= "backimageclass" targetElementId= "radialtarget1" (click)="onItemClick($event)" [position]="position">
        <e-items>
            <e-item imageUrl="http://js.syncfusion.com/demos/web/content/images/RadialMenu/font.png" text="Bold" ></e-item>
            <e-item imageUrl="http://js.syncfusion.com/demos/web/content/images/RadialMenu/f1.png" text="Italic" ></e-item>
            <e-item imageUrl="http://js.syncfusion.com/demos/web/content/images/RadialMenu/redo.png" text="Redo" ></e-item>
            <e-item imageUrl="http://js.syncfusion.com/demos/web/content/images/RadialMenu/undo.png" text="Undo" ></e-item>
        </e-items>
        </ej-radialmenu>

    Define position value in constructor file.

  • JAVASCRIPT
  • export class AppComponent {    
        position:any;
        constructor() {
    	this.position={x:10,y:10};  	
        }

    The following screenshot illustrates the output while selecting the text in the page.