nimeso/silverstripe-drawpolygonfield

Create a polygon shape using HTML5 canvas

Installs: 18

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 1

Open Issues: 2

Language:JavaScript

Type:silverstripe-module

dev-master 2014-08-16 21:26 UTC

This package is auto-updated.

Last update: 2024-11-12 19:09:30 UTC


README

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.

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));