~helioviewer/helioviewer.org/1.0

« back to all changes in this revision

Viewing changes to lib/helioviewer/Helioviewer.js

  • Committer: V. Keith Hughitt
  • Date: 2009-07-30 13:13:26 UTC
  • mfrom: (233.1.59 helioviewer)
  • Revision ID: hughitt1@kore-20090730131326-69sq8n2z24748la5
2009/07/30 post-merge save

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 * Syntax: jQuery, Prototype ()
13
13
 */
14
14
 
15
 
/*global Class, $, $A, Builder, Calendar, Element, Event, EventLayerAccordion, EventLayerManager, EventTimeline, LayerManager, ImageSelectTool, MediaSettings, MovieBuilder, TileLayerManager, MessageConsole, TileLayer, TileLayerAccordion, TimeControls, UserSettings, ZoomControl, jQuery, LoadingIndicator, Viewport, document, window, Time */
 
15
/*global Class, $, $A, Builder, Calendar, Element, Event, EventLayerAccordion, EventLayerManager, EventTimeline, LayerManager, ImageSelectTool, MediaSettings, MovieBuilder, TileLayerManager, MessageConsole, Shadowbox, TileLayer, TileLayerAccordion, TimeControls, UserSettings, ZoomControls, jQuery, LoadingIndicator, Viewport, document, console, window, Time */
16
16
var Helioviewer = Class.create(
17
17
        /** @lends Helioviewer.prototype */
18
18
        {
76
76
         * @description Initialize Helioviewer's user interface (UI) components
77
77
         */
78
78
        _initUI: function () {
79
 
                var centerBtn, outsideBox, mouseCoords;
 
79
                var mouseCoords;
80
80
 
81
81
                // Observation date & controls
82
82
                this.date = new Time(this);
254
254
     * Syntax: jQuery
255
255
     */
256
256
    _createFullscreenBtn: function () {
257
 
        var btn, footer, header, vp, sb, speed, marginSize, panels, btns, outsideBox, origOutsideMarginLeft, 
 
257
        var btn, footer, header, vp, sb, speed, marginSize, panels, outsideBox, origOutsideMarginLeft, 
258
258
            origOutsideMarginRight, origHeaderHeight, origViewportHeight, $_fx_step_default, self, body;
259
259
        
260
260
        // get dom-node
367
367
    },
368
368
 
369
369
        /**
370
 
         * @description Creates a button that allows the user to take screenshots of what is in their viewport.
 
370
         * @description Creates an event observer for the button that allows the user to take screenshots of what is in their viewport.
371
371
         */
372
372
        _createScreenshotButton: function () {
373
 
        this.button = jQuery("#screenshot-button");
374
 
                this.url        = "api/index.php";
375
 
                this.sharpen     = false;
376
 
                this.edgeEnhance = false;
377
 
                this.building    = false;
 
373
        var button    = jQuery("#screenshot-button"), visibleCoords;
 
374
                this.building = false;
378
375
                
379
376
                var self = this;
380
 
                this.button.click(function () {
 
377
                button.click(function () {
 
378
                        // self.building is set in imageSelectTool.takeScreenshot
381
379
                        if (self.building) {
382
380
                                self.messageConsole.info("A link to your screenshot will be available shortly.");
383
381
                        }
384
382
                        else {
385
 
                                var visibleCoords = self.viewport.getHCViewportPixelCoords();
 
383
                                visibleCoords = self.viewport.getHCViewportPixelCoords();
386
384
                                self.imageSelectTool.takeScreenshot(self, visibleCoords);
387
385
                        }
388
386
                });