G Markeable AreaTo use GMarkable Area First you need to include it as a dependency in your project.
Following is a description of the content of the module:
MarkableBlock:
MarkableAble placeholders.
Markeable Inputs:
MarkerPointList a list of points, this should be passed in if we want to show the image with markers previously marked.
MarkeableAreaOptions, a structure that defines some configurations for the markeable block.
MarkerPoint
A marker point has the following attributes:
MarkeableAreaOptions
MarkeableArea options has the following attributes:
Block Events
Markeable block has the following events:
MarkeableBlockReady- This event is triggeret when the markeable block is ready, and returns the internal id of the markeable area object. Note: The id returned is the id that must be used to call additionalFunctions on the same object.
MarkerAdded- This event is triggered every time a marker is added to the content through the user click. It contains in its payload information about the object added
MarkerLabelUpdated - This event is triggered when the label of a marker is updated. It contains in its payload the id of the marker and the value for the new label.
MarkerRemoved- This event is triggered when a user removes a marker from the content. It contains in its payload the id of the marker removed.
AdditionalFunctions
AddPoints - This function allows you to dinammically add any list of points to the content.
RemovePoint- This function allows you to remove a specific point by id
ResetPoints- This function resets all the points in the given area
GetSizeRatio- This function gets the size ratio for the given area, besides the Id it also needs the original dimensions for the area. This will return both x and y ratios. 1 means is a 1:1 ratio.
Move- This function allows you to move any point in any direction. Allowed directions are Up, Down, Left and Right
Rotate- This function allows you to rotate any point. Allowed directions are Left or Right.
Rotate- This function
Direction Pad Block:
This block allows you to create a simple direction pad:
This direction pad triggers an event with the direction clicked , and can be usefull for example to control a point on the area with the action move.