Skip to content

Commit

Permalink
Add events for polylines
Browse files Browse the repository at this point in the history
  • Loading branch information
barhom committed Apr 18, 2022
1 parent a784d88 commit 2cbac9c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion resources/views/polyline.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,16 @@

shapes.push({
'polyline_{!! $id !!}': polyline_{!! $id !!}
});
});

@foreach (['eventClick', 'eventDblClick', 'eventRightClick', 'eventMouseOver', 'eventMouseDown', 'eventMouseUp', 'eventMouseOut', 'eventDrag', 'eventDragStart', 'eventDragEnd', 'eventDomReady'] as $event)

@if (isset($options[$event]))

google.maps.event.addListener(polyline_{!! $id !!}, '{!! str_replace('event', '', strtolower($event)) !!}', function (event) {
{!! $options[$event] !!}
});

@endif

@endforeach

0 comments on commit 2cbac9c

Please sign in to comment.