I'd like to enable a draw function in an Openlayers 3 application for drawing a rectangle - up to a certain size (in the defined projected coordinate system, in square meters). For this ol.interaction.draw instance the draw.createBox geometryFunction would be used and the 'Circle' type, as per
http://openlayers.org/en/latest/examples/draw-shapes.html?q=draw
the geometryFunction is where to "modify the geometry during drawing" as per a prior thread:
Undoing last point when drawing linestring in OpenLayers 3? )
but for drawing a rectangle the predefined createBox geometryFunction is used and not a custom one that might perhaps continually check the size of the rectangle. Or is this not the place to put in a check of the current size of the rectangle being drawn? Is what I wish realistic?