How to re-render selected area in image area select
Posted: 25 Jan 2018, 14:59
I want to select some portion of image on load event using Image area select.
Is this possible to re-render.
Is this possible to re-render.
Code: Select all
PrimeFaces.widgets.widget_areaSelect.setSelection(334,193,334,193);
Code: Select all
/**
* Set the current selection.
* This method only sets the internal representation of selection in the plugin instance,
* it does not update the visual interface.
* If you want the new selection to be shown, call update() right after setSelection().
* Also make sure that the show option is set to true.
*
* @param {int} x1 X coordinate of the top left corner of the selection area.
* @param {int} y1 Y coordinate of the top left corner of the selection area.
* @param {int} x2 X coordinate of the bottom right corner of the selection area.
* @param {int} y2 Y coordinate of the bottom right corner of the selection area.
*/
setSelection : function(x1, y1, x2, y2) {
this.instance.setSelection(x1, y1, x2, y2);
},