|
|
|
@ -16,9 +16,10 @@ has popup_class => (is => 'rw', default => 'pin-popup'); |
|
|
|
|
|
|
|
|
|
sub render($this, $pin_container, $x, $y, $w, $h, $laters = undef) |
|
|
|
|
{ |
|
|
|
|
my $element = $pin_container->image(href => $this->{icon}, |
|
|
|
|
my $group = $pin_container->g(); |
|
|
|
|
my $element = $group->use(href => "#$this->{icon}_symbol", |
|
|
|
|
x => $x, y => $y, width => $w, height => $h); |
|
|
|
|
$element->{id} = "$this->{id}-img"; |
|
|
|
|
$element->{id} = "$this->{id}-use"; |
|
|
|
|
$element->{onclick} = "clickPin('$this->{id}', '$pin_container->{id}');"; |
|
|
|
|
my $center_x = $x + $w/2; |
|
|
|
|
my $center_y = $y + $h/2; |
|
|
|
@ -28,7 +29,7 @@ sub render($this, $pin_container, $x, $y, $w, $h, $laters = undef) |
|
|
|
|
push @$laters, sub ($popup_container) { $this->render_popup($popup_container, |
|
|
|
|
$pin_container->{transform}, $center_x, $center_y); }; |
|
|
|
|
} |
|
|
|
|
return $element; |
|
|
|
|
return $group; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
sub render_popup($this, $popup_container, $transform, $x_shift, $y_shift) |
|
|
|
|