From 1e0389fffbc33ad235e717756cb8b0b361f5b93b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 18 Mar 2012 18:02:03 -0400 Subject: [PATCH] remove fullscreen option The cgi shows a fullscreen map, so having this other option to do it seems redundant, and also layering a fullscreen map over an existing wiki page doesn't look very good to me (and prevents editing the page etc). --- IkiWiki/Plugin/osm.pm | 25 +++++++------------------ doc/ikiwiki/directive/osm.mdwn | 12 +++++------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/IkiWiki/Plugin/osm.pm b/IkiWiki/Plugin/osm.pm index 511fe3c9b..84e43b710 100644 --- a/IkiWiki/Plugin/osm.pm +++ b/IkiWiki/Plugin/osm.pm @@ -71,26 +71,15 @@ sub preprocess { my $lon = $params{'lon'}; # sanitized below my $href = $params{'href'}; - my $fullscreen = defined($params{'fullscreen'}); # sanitized here my ($width, $height, $float); - if ($fullscreen) { - $height = '100%'; - $width = '100%'; - $float = 0; - } - else { - $height = scrub($params{'height'} || "300px", $page, $dest); # sanitized here - $width = scrub($params{'width'} || "500px", $page, $dest); # sanitized here - $float = (defined($params{'right'}) && 'right') || (defined($params{'left'}) && 'left'); # sanitized here - } + $height = scrub($params{'height'} || "300px", $page, $dest); # sanitized here + $width = scrub($params{'width'} || "500px", $page, $dest); # sanitized here + $float = (defined($params{'right'}) && 'right') || (defined($params{'left'}) && 'left'); # sanitized here + my $zoom = scrub($params{'zoom'} // $config{'osm_default_zoom'} // 15, $page, $dest); # sanitized below my $map; - if ($fullscreen) { - $map = $params{'map'} || $page; - } - else { - $map = $params{'map'} || 'map'; - } + $map = $params{'map'} || 'map'; + $map = scrub($map, $page, $dest); # sanitized here my $name = scrub($params{'name'} || $map, $page, $dest); @@ -114,7 +103,7 @@ sub preprocess { width => $width, float => $float, zoom => $zoom, - fullscreen => $fullscreen, + fullscreen => 0, editable => defined($params{'editable'}), lat => $lat, lon => $lon, diff --git a/doc/ikiwiki/directive/osm.mdwn b/doc/ikiwiki/directive/osm.mdwn index a2cdd667f..6807a8198 100644 --- a/doc/ikiwiki/directive/osm.mdwn +++ b/doc/ikiwiki/directive/osm.mdwn @@ -27,18 +27,16 @@ icon.png (default, modifiable).. ## map display - * `map` - map to display, defaults to the current page - name in fullscreen mode, "map" otherwise + * `map` - map to display, defaults to "map" * `zoom` - the level to zoom to on the OSM map * `loc` - lattitude and longitude of the map center * `lat` - lattitude * `lon` - longitude - * `fullscreen` - make the map take the whole screen through CSS * `editable` - add edit controls in a separate layer - * `right` - float the map right, ignored for fullscreen - * `left` - float the map left (default unless fullscreen) - * `width` - width of the map, ignored for fullscreen - * `height` - height of the map, ignored for fullscreen + * `right` - float the map right + * `left` - float the map left (default) + * `width` - width of the map + * `height` - height of the map ## waypoints -- 2.44.0