Add click and drag to hotspots during edit
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -49,6 +49,9 @@ class GlModelTransformOutput extends MediaTransformOutput {
|
||||
if (isset($options['img-class'])) {
|
||||
$this->parameters['class'] = $options['img-class'];
|
||||
}
|
||||
if (isset($options['preview']) && $options['preview']) {
|
||||
$this->parameters['preview'] = $options['preview'];
|
||||
}
|
||||
return self::buildViewer($this->file->getDescriptionText(),$this->url,$this->parameters);
|
||||
}
|
||||
|
||||
@@ -89,10 +92,13 @@ class GlModelTransformOutput extends MediaTransformOutput {
|
||||
$hsDefault = array(
|
||||
'class' => 'Hotspot',
|
||||
'slot' => 'hotspot-'.(count($hotspots) +1),
|
||||
'onmousedown' => 'event.stopPropagation()',
|
||||
'ontouchstart' => 'event.stopPropagation()',
|
||||
'onclick' => 'onAnnotation(event)'
|
||||
);
|
||||
if (isset($viewParams['preview'])) {
|
||||
$hsDefault['onmousedown'] = 'grabAnnotation(event)';
|
||||
$hsDefault['onmouseup'] = 'releaseAnnotation(event)';
|
||||
}
|
||||
$attrHotspot = array_merge($hsDefault, $an);
|
||||
$elHotspot = Html::rawElement('button',$attrHotspot,$elAnnot.(count($hotspots) +1));
|
||||
array_push($hotspots, $elHotspot);
|
||||
|
||||
Reference in New Issue
Block a user