Add annotation set transform framework
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -23,6 +23,7 @@ class GlModelTransformOutput extends MediaTransformOutput {
|
||||
$this->height = $parameters['height'];
|
||||
$this->view = (isset($parameters['view'])) ? $parameters['view'] : 'default';
|
||||
$this->hsset = (isset($parameters['hsset'])) ? $parameters['hsset'] : 'all';
|
||||
$this->transform = (isset($parameters['settrans'])) ? preg_split("/[\s,]+/", $parameters['settrans']) : [];
|
||||
$this->url = $file->getFullUrl();
|
||||
$this->thumb = isset($parameters['isFilePageThumb']) && $parameters['isFilePageThumb'];
|
||||
}
|
||||
@@ -112,6 +113,15 @@ class GlModelTransformOutput extends MediaTransformOutput {
|
||||
} else {
|
||||
$annotations = $metadata['annotations'];
|
||||
}
|
||||
|
||||
//Apply any request transformations
|
||||
if ($this->transform) {
|
||||
if (in_array('alpha',$this->transform)) {
|
||||
ksort($annotations);
|
||||
}
|
||||
}
|
||||
|
||||
//Create hotspot elements
|
||||
foreach($annotations as $label => $an) {
|
||||
$elAnnot = Html::rawElement('div',['class' => 'HotspotAnnotation HiddenAnnotation'],$label);
|
||||
$hsDefault = array(
|
||||
|
||||
Reference in New Issue
Block a user