Add support for rectangles.

This commit is contained in:
David Molineus
2015-01-07 18:58:52 +01:00
parent d9f12eff2d
commit b3c0bd72df
4 changed files with 82 additions and 2 deletions

View File

@@ -22,3 +22,7 @@
.tl_listing_container.tree_view ul[class="level_1"] li.tl_file > .tl_left {
padding-left: 20px !important;
}
.long .tl_text_2 {
width: 325px;
}

View File

@@ -56,6 +56,7 @@ $GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Vector\PolygonM
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Vector\MultiPolygonMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Vector\CircleMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Vector\CircleMarkerMapper';
$GLOBALS['LEAFLET_MAPPERS'][] = 'Netzmacht\Contao\Leaflet\Mapper\Vector\RectangleMapper';
/*
* Leaflet encoders.

View File

@@ -125,7 +125,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'multiPolygon extends multiPolyline' => array(
),
'rectangle extends polygon' => array(),
'rectangle extends polygon' => array(
'data' => array('bounds'),
),
'circle extends default' => array(
'+data' => array('coordinates', 'radius'),
@@ -388,6 +390,22 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
)
),
'sql' => "longblob NULL"
)
),
'bounds' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_vector']['bounds'],
'exclude' => true,
'inputType' => 'text',
'save_callback' => array(
),
'eval' => array(
'maxlength' => 255,
'multiple'=>true,
'size'=>2,
'tl_class' => 'long clr',
'nullIfEmpty' => true,
),
'sql' => "mediumblob NULL"
),
),
);