Skip to main content

Integer values were set for X and Y of the layer.

Plugin API X,Y, absoluteTransform to get the values, X is a decimal number.

Is there a way to get the integer value set for a layer?



  • UI Setup Values

    ■Frame (parent node of layer)

    X = -961

    Y = -361

    ■Layer(Layer name=Semicircle)

    X = 1297

    Y = 56

  • Plugin API Values

    X = 1296.999755859375

    Y = 56

    absoluteTransform = a1,-4.493613679069e-17,335.999755859375], 54.493613679069e-17, 1, -305]

    Example_Ellipse.fig (19.3 KB)

Thanks for asking!


The UI shows x and y values with two decimal points of precision, but as you saw from the Plugin API, the Figma file tracks positioning to a much greater degree of precision. If you’re using and/or changing the position of a node using your plugin, we generally recommend using the position values as-is. But, if you have a need to display the x and y values you retrieved from the plugin API in the same format as the Figma UI, you can round them to two decimal points of precision.


Thanks for the answer.


Thanks to you I have solved the problem.


I have another problem. If you can help me understand, please answer.


Reply