silverstripe-module silverstripe-drawpolygonfield
Create a polygon shape using HTML5 canvas
nimeso/silverstripe-drawpolygonfield
Create a polygon shape using HTML5 canvas
- Saturday, August 16, 2014
- by nimeso
- Repository
- 1 Watchers
- 3 Stars
- 12 Installations
- JavaScript
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 2 Open issues
- 1 Versions
- 0 % Grown
SilverStripe Draw Polygon Field
Allows you to draw a polygon shape using HTML5 canvas. The x,y points are saved as a comma delimited string in the database. It also excepts a ArrayList of Image objects that can be rendered in the background of the canvas., (*1)
Usage
// optional images to render
$images = ArrayList();
$images->add($someImageObj);
$images->add($anotherImageObj);
// create field
$fields->push(new DrawPolygonField("Points","Points",null,1140,600,$images));
dev-master
9999999-dev
Create a polygon shape using HTML5 canvas
Sources
Download
BSD-2
by
Jamie Barker