Uploaded image for project: 'ZK Gmaps'
  1. ZK Gmaps
  2. ZKGMAPS-11

Gmaps effect.mask causes JS exception after ZK 8.0.2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.0.4
    • 3.0.3
    • Security Level: Jimmy
    • None
    • Using ZK 8.0.2

      Reproduced with:

      <div>
      	<div id="hidden" visible="false">
      		<gmaps width="400px" height="300px"/>
      	</div>
      		<button onClick="hidden.setVisible(true)"/>
      </div>
      
      

      When using a gmaps, initially not visible.
      In ZK 8.0.1.1:

      zk/src/archive/web/js/zk/effect.js : 233

      if (!$anchor.jq.length || !$anchor.isRealVisible(true)) return; //nothing do to.
      this._opts = opts;
      

      this._opts is not updated

      this causes in gmapsz/src/archive/web/js/gmaps/Gmaps.js :669

      	_tryBind: function(dt, skipper, after) {
      		var maskOpts;
      		if (maskOpts = this._maskOpts) {
      			if (maskOpts._mask && maskOpts._mask._opts) {
      

      maskOpts._mask._opts is not set, thus the If() branch is not fulfilled.

      in ZK 8.0.2
      zk/src/archive/web/js/zk/effect.js : 233

      this._opts = opts;
      if (!$anchor.jq.length || !$anchor.isRealVisible(true)) return; //nothing do to.
      

      this._opts is updated

      This causes maskOpts._mask._opts to not be null, and fullfil the if() branch, which fail as the mask is not rendered.

            SEFI SEFI
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h