PageSourceSearch

http://vttrack.fr/js/OpenLayers-2.12/lib/OpenLayers/Control/FullScreen.js?1790354456

js vttrack.fr collected 2026-09-25 18:39:15 UTC 2,367 bytes, 81 lines download raw bytes

1/* Copyright (c) 2011-2012 by OpenLayers Contributors (see authors.txt for
2 * full list of contributors). Published under the Clear BSD license.
3 * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
4 * DCM++ FROM: http://fredj.github.com/openlayers-fullscreen/examples/fullscreen.html
5 * Nécéssite quelques ajours dans theme/default/styles.css
6 * full text of the license. */
7
8/**
9 * @requires OpenLayers/Control.js
10 */
11
12OpenLayers.Control.FullScreen = OpenLayers.Class(OpenLayers.Control, {
13
14    type: OpenLayers.Control.TYPE_TOGGLE,
15
16    fullscreenClass: 'fullscreen',
17
18    setMap: function(map) {
19        OpenLayers.Control.prototype.setMap.apply(this, arguments);
20
21        // handle 'Esc' key press
22        OpenLayers.Event.observe(document, "fullscreenchange", OpenLayers.Function.bind(function() {
23            if (!document.fullscreenEnabled) {
24                this.deactivate();
25            }
26        }, this));
27    },
28
29    activate: function() {
30        if (OpenLayers.Control.prototype.activate.apply(this, arguments)) {
31			var divs = document.getElementsByTagName('div');
32			for (var i in divs)
33				if (divs[i].className &&
34					divs[i].className.indexOf ('olMap') !=-1)
35					OpenLayers.Element.addClass (
36						divs[i], 
37						divs[i].id == this.map.div.id
38							? this.fullscreenClass
39							: 'offscreen'
40					);
41			this.map.updateSize();
42            return true;
43        } else {
44            return false;
45        }
46    },
47
48    deactivate: function() {
49        if (OpenLayers.Control.prototype.deactivate.apply(this, arguments)) {
50			var divs = document.getElementsByTagName('div');
51			for (var i in divs)
52				OpenLayers.Element.removeClass (divs[i], 'offscreen');
53
54            OpenLayers.Element.removeClass(this.map.div, this.fullscreenClass);
55            this.map.updateSize();
56            return true;
57        } else {
58            return false;
59        }
60    },
61
62    CLASS_NAME: "OpenLayers.Control.FullScreen"
63});
64
65
66OpenLayers.Control.FullScreenPanel = OpenLayers.Class(OpenLayers.Control.Panel, {
67
68	displayClass: 'olControlFullScreenPanel',
69
70    initialize: function(options) {
71        OpenLayers.Control.Panel.prototype.initialize.apply(this, arguments);
72		
73		this.addControls([
74			new OpenLayers.Control.FullScreen({
75				title: "Plein Ecran / Retour"
76			})
77		]);
78    },
79
80    CLASS_NAME: "OpenLayers.Control.FullScreenPanel"
81});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.