# all files / ol/render/ renderevent.js

100% Statements 12/12
100% Branches 0/0
100% Functions 1/1
100% Lines 12/12

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    791×
    1×

    1×
    1×

    1×

    1×

    4×

    4×

    4×

    4×

    4×

    1×
     goog.provide('ol.render.Event');
    goog.provide('ol.render.EventType');

    goog.require('ol.events.Event');
    goog.require('ol.render.VectorContext');

    /**
     * @enum {string}
     */
    ol.render.EventType = {
      /**
       * @event ol.render.Event#postcompose
       * @api
       */
      POSTCOMPOSE: 'postcompose',
      /**
       * @event ol.render.Event#precompose
       * @api
       */
      PRECOMPOSE: 'precompose',
      /**
       * @event ol.render.Event#render
       * @api
       */
      RENDER: 'render'
    };

    /**
     * @constructor
     * @extends {ol.events.Event}
     * @implements {oli.render.Event}
     * @param {ol.render.EventType} type Type.
     * @param {Object=} opt_target Target.
     * @param {ol.render.VectorContext=} opt_vectorContext Vector context.
     * @param {olx.FrameState=} opt_frameState Frame state.
     * @param {?CanvasRenderingContext2D=} opt_context Context.
     * @param {?ol.webgl.Context=} opt_glContext WebGL Context.
     */
    ol.render.Event = function(
        type, opt_target, opt_vectorContext, opt_frameState, opt_context,
        opt_glContext) {

      goog.base(this, type, opt_target);

      /**
       * For canvas, this is an instance of {@link ol.render.canvas.Immediate}.
       * @type {ol.render.VectorContext|undefined}
       * @api
       */
      this.vectorContext = opt_vectorContext;

      /**
       * An object representing the current render frame state.
       * @type {olx.FrameState|undefined}
       * @api
       */
      this.frameState = opt_frameState;

      /**
       * Canvas context. Only available when a Canvas renderer is used, null
       * otherwise.
       * @type {CanvasRenderingContext2D|null|undefined}
       * @api
       */
      this.context = opt_context;

      /**
       * WebGL context. Only available when a WebGL renderer is used, null
       * otherwise.
       * @type {ol.webgl.Context|null|undefined}
       * @api
       */
      this.glContext = opt_glContext;

    };
    goog.inherits(ol.render.Event, ol.events.Event);