I want to select some portion of image on load event using Image area select.
Is this possible to re-render.
How to re-render selected area in image area select
So you want a certain area pre-selected basically?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
So looking at the code there are javascript methods on the widget to setSelection.
Here is what the document says:
But I can't seem to make it work.
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);
},
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 26 guests