henrichen / zkgmapsz

Automatically exported from code.google.com/p/zkgmapsz
0 stars 0 forks source link

JS error appear with multiple gmaps #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Reproducible sample below:
<zk>
    <gmaps width="500px" height="500px" />
    <gmaps width="500px" height="500px" />
</zk>

Workaround: do not sync if no mask element in zk.eff.Mask

<zk>
    <script><![CDATA[
        zk.afterLoad("zul", function () {
            var _mwgt = {};
            zk.override(zk.eff.Mask.prototype, _mwgt, {
                sync: function () {
                    if (this.mask)
                        _mwgt.sync.apply(this, arguments);
                }
            });
        });
    ]]></script>
    <gmaps width="500px" height="500px" />
    <gmaps width="500px" height="500px" />
</zk>

How to fix:

Modify _realBind method,
change
maskOpts._mask.sync();
to
if (maskOpts._mask.mask)
    maskOpts._mask.sync();

Original issue reported on code.google.com by benbai...@gmail.com on 21 Nov 2013 at 2:51

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r60.

Original comment by raymondchao@potix.com on 28 Nov 2013 at 9:15