<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>sheetengine Issue Tracker Rss Feed</title><link>https://sheetengine.codeplex.com/workitem/list/basic</link><description>sheetengine Issue Tracker Rss Description</description><item><title>Commented Unassigned: Moving around in a large scene with no character just asdw keys? [7]</title><link>http://sheetengine.codeplex.com/workitem/7</link><description>Hi, &lt;br /&gt;&lt;br /&gt;I&amp;#39;m new to sheetengine, and just having a few issues rendering large scenes. &lt;br /&gt;&lt;br /&gt;I am using the loadAndRemoveSheets&amp;#40;&amp;#41; function like in the example files. I would like to be able to move around inside the world but without a character. I have created some action listeners for the asdw keys, when I use the asdw keys to move around the correct tiles are being created and destroyed. But the new tile does not position in the center of the canvas. Is it possible to get this newly drawn center tile to be displayed in the center of the canvas&amp;#63; I have tried sheetengine.scene.setCenter&amp;#40;targetp, targetpuv&amp;#41;&amp;#59; but had little success. &lt;br /&gt;&lt;br /&gt;Thanks for any help&amp;#33;&lt;br /&gt;&lt;br /&gt;CODE&amp;#58; &lt;br /&gt;&lt;br /&gt;&amp;#36;&amp;#40;function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;        var canvasElement &amp;#61; document.getElementById&amp;#40;&amp;#39;maincanvas&amp;#39;&amp;#41;&amp;#59;&lt;br /&gt;        sheetengine.scene.init&amp;#40;canvasElement, &amp;#123;w&amp;#58;900,h&amp;#58;500&amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        var centertile &amp;#61; &amp;#123;x&amp;#58;0,y&amp;#58;0,z&amp;#58;0&amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;        &amp;#47;&amp;#47; define some basesheets&lt;br /&gt;        var map &amp;#61; &amp;#91;&amp;#93;&amp;#59;&lt;br /&gt;        for &amp;#40;var x&amp;#61;-3&amp;#59; x&amp;#60;&amp;#61;3&amp;#59; x&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;            for &amp;#40;var y&amp;#61;-3&amp;#59; y&amp;#60;&amp;#61;3&amp;#59; y&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;                map.push&amp;#40;&amp;#123;&lt;br /&gt;                    centerp&amp;#58; &amp;#123; x&amp;#58; x &amp;#42; 100, y&amp;#58; y &amp;#42; 100, z&amp;#58; 0 &amp;#125;,&lt;br /&gt;                    orientation&amp;#58; &amp;#123;alphaD&amp;#58; 90, betaD&amp;#58; 0, gammaD&amp;#58; 0&amp;#125;,&lt;br /&gt;                    size&amp;#58; &amp;#123;w&amp;#58;100,h&amp;#58;100&amp;#125;,&lt;br /&gt;                    init&amp;#58; function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;                        var basesheet &amp;#61; new sheetengine.BaseSheet&amp;#40;this.centerp, this.orientation, this.size&amp;#41;&amp;#59;&lt;br /&gt;                        basesheet.color &amp;#61; &amp;#39;&amp;#35;5D7E36&amp;#39;&amp;#59;&lt;br /&gt;                        return basesheet&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        &amp;#47;&amp;#47; define some sheets&lt;br /&gt;        for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;50&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;            &amp;#40;function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;                var w &amp;#61; Math.random&amp;#40;&amp;#41;&amp;#42;10 &amp;#43; 30&amp;#59;&lt;br /&gt;                var z &amp;#61; w&amp;#59;&lt;br /&gt;                var c &amp;#61; Math.floor&amp;#40;Math.random&amp;#40;&amp;#41;&amp;#42;3&amp;#41;&amp;#59;&lt;br /&gt;                map.push&amp;#40;&amp;#123;&lt;br /&gt;                    centerp&amp;#58; &amp;#123;x&amp;#58;Math.random&amp;#40;&amp;#41;&amp;#42;1000 - 500, y&amp;#58;Math.random&amp;#40;&amp;#41;&amp;#42;1000 - 500, z&amp;#58;z&amp;#125;,&lt;br /&gt;                    orientation&amp;#58; &amp;#123;alphaD&amp;#58;c &amp;#61;&amp;#61; 0 &amp;#63; 90 &amp;#58; 0, betaD&amp;#58;c &amp;#61;&amp;#61; 1 &amp;#63; 90 &amp;#58; 0, gammaD&amp;#58;c &amp;#61;&amp;#61; 2 &amp;#63; 90 &amp;#58; 0&amp;#125;,&lt;br /&gt;                    size&amp;#58; &amp;#123;w&amp;#58;w,h&amp;#58;w&amp;#125;,&lt;br /&gt;                    init&amp;#58; function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;                        var sheet &amp;#61; new sheetengine.Sheet&amp;#40;this.centerp, this.orientation, this.size&amp;#41;&amp;#59;&lt;br /&gt;                        sheet.context.fillStyle &amp;#61; c &amp;#61;&amp;#61; 0 &amp;#63; &amp;#39;&amp;#35;006&amp;#39; &amp;#58; c &amp;#61;&amp;#61; 1 &amp;#63; &amp;#39;&amp;#35;600&amp;#39; &amp;#58; &amp;#39;&amp;#35;060&amp;#39;&amp;#59;&lt;br /&gt;                        sheet.context.fillRect&amp;#40;0,0,w,w&amp;#41;&amp;#59;&lt;br /&gt;                        return sheet&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&amp;#41;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        sheetengine.scene.setCenter&amp;#40;centertile&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        loadAndRemoveSheets&amp;#40;&amp;#123;x&amp;#58;0,y&amp;#58;0&amp;#125;, centertile&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        &amp;#47;&amp;#47; draw initial scene&lt;br /&gt;        sheetengine.calc.calculateAllSheets&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        sheetengine.drawing.drawScene&amp;#40;true&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        window.onkeydown &amp;#61; function&amp;#40;e&amp;#41;&amp;#123;&lt;br /&gt;            move&amp;#40; e.keyCode &amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;        window.onkeyup &amp;#61; function&amp;#40;e&amp;#41;&amp;#123;&lt;br /&gt;            move&amp;#40; e.keyCode &amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;        function move&amp;#40;key&amp;#41; &amp;#123;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47;var oldcentertile &amp;#61; &amp;#36;.extend&amp;#40; &amp;#123;&amp;#125;, centertile &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            var newcentertile &amp;#61; &amp;#123;x&amp;#58;0,y&amp;#58;0,z&amp;#58;0&amp;#125;&lt;br /&gt;            if &amp;#40;key &amp;#61;&amp;#61; 87&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.y -&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125; else if &amp;#40;key &amp;#61;&amp;#61; 83&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.y &amp;#43;&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125; else if &amp;#40;key &amp;#61;&amp;#61; 65&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.x &amp;#43;&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125; else if &amp;#40;key &amp;#61;&amp;#61; 68&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.x -&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            loadAndRemoveSheets&amp;#40; centertile, newcentertile &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            sheetengine.scene.setCenter&amp;#40;newcentertile&amp;#41;&amp;#59;&lt;br /&gt;            sheetengine.calc.calculateChangedSheets&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            sheetengine.drawing.drawScene&amp;#40;true&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47;sheetengine.drawing.drawScene&amp;#40;true&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        function loadAndRemoveSheets&amp;#40;oldcentertile, centertile&amp;#41; &amp;#123;&lt;br /&gt;            var boundary &amp;#61; &amp;#123; xmin&amp;#58; centertile.x &amp;#42; 100 - 300, xmax&amp;#58; centertile.x &amp;#42; 100 &amp;#43; 300, ymin&amp;#58; centertile.y &amp;#42; 100 - 300, ymax&amp;#58; centertile.y &amp;#42; 100 &amp;#43; 300 &amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;            console.log&amp;#40; boundary &amp;#41;&amp;#59;&lt;br /&gt;            console.log&amp;#40; oldcentertile &amp;#41;&amp;#59;&lt;br /&gt;            console.log&amp;#40; centertile &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; remove sheets that are far&lt;br /&gt;            for &amp;#40;var i&amp;#61;0&amp;#59;i&amp;#60;map.length&amp;#59;i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;                var sheetinfo &amp;#61; map&amp;#91;i&amp;#93;&amp;#59;&lt;br /&gt;                if &amp;#40;sheetinfo.centerp.x &amp;#60; boundary.xmin &amp;#124;&amp;#124; sheetinfo.centerp.x &amp;#62; boundary.xmax &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#60; boundary.ymin &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#62; boundary.ymax&amp;#41; &amp;#123;&lt;br /&gt;                    if &amp;#40;sheetinfo.added&amp;#41; &amp;#123;&lt;br /&gt;                        sheetinfo.sheet.destroy&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                        sheetinfo.added &amp;#61; false&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; add new sheets&lt;br /&gt;            for &amp;#40;var i&amp;#61;0&amp;#59;i&amp;#60;map.length&amp;#59;i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;                var sheetinfo &amp;#61; map&amp;#91;i&amp;#93;&amp;#59;&lt;br /&gt;                if &amp;#40;sheetinfo.centerp.x &amp;#60; boundary.xmin &amp;#124;&amp;#124; sheetinfo.centerp.x &amp;#62; boundary.xmax &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#60; boundary.ymin &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#62; boundary.ymax&amp;#41;&lt;br /&gt;                    continue&amp;#59;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;&amp;#33;sheetinfo.added&amp;#41; &amp;#123;&lt;br /&gt;                    sheetinfo.sheet &amp;#61; sheetinfo.init&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                    sheetinfo.added &amp;#61; true&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; translate background&lt;br /&gt;            sheetengine.scene.translateBackground&amp;#40;&lt;br /&gt;                &amp;#123;x&amp;#58;oldcentertile.x&amp;#42;100,y&amp;#58;oldcentertile.y&amp;#42;100&amp;#125;,&lt;br /&gt;                &amp;#123;x&amp;#58;centertile.x&amp;#42;100,y&amp;#58;centertile.y&amp;#42;100&amp;#125;&lt;br /&gt;            &amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;    &amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;Comments: move.png</description><author>Freid001</author><pubDate>Sun, 03 Jan 2016 15:47:05 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Moving around in a large scene with no character just asdw keys? [7] 20160103034705P</guid></item><item><title>Commented Unassigned: Moving around in a large scene with no character just asdw keys? [7]</title><link>http://sheetengine.codeplex.com/workitem/7</link><description>Hi, &lt;br /&gt;&lt;br /&gt;I&amp;#39;m new to sheetengine, and just having a few issues rendering large scenes. &lt;br /&gt;&lt;br /&gt;I am using the loadAndRemoveSheets&amp;#40;&amp;#41; function like in the example files. I would like to be able to move around inside the world but without a character. I have created some action listeners for the asdw keys, when I use the asdw keys to move around the correct tiles are being created and destroyed. But the new tile does not position in the center of the canvas. Is it possible to get this newly drawn center tile to be displayed in the center of the canvas&amp;#63; I have tried sheetengine.scene.setCenter&amp;#40;targetp, targetpuv&amp;#41;&amp;#59; but had little success. &lt;br /&gt;&lt;br /&gt;Thanks for any help&amp;#33;&lt;br /&gt;&lt;br /&gt;CODE&amp;#58; &lt;br /&gt;&lt;br /&gt;&amp;#36;&amp;#40;function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;        var canvasElement &amp;#61; document.getElementById&amp;#40;&amp;#39;maincanvas&amp;#39;&amp;#41;&amp;#59;&lt;br /&gt;        sheetengine.scene.init&amp;#40;canvasElement, &amp;#123;w&amp;#58;900,h&amp;#58;500&amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        var centertile &amp;#61; &amp;#123;x&amp;#58;0,y&amp;#58;0,z&amp;#58;0&amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;        &amp;#47;&amp;#47; define some basesheets&lt;br /&gt;        var map &amp;#61; &amp;#91;&amp;#93;&amp;#59;&lt;br /&gt;        for &amp;#40;var x&amp;#61;-3&amp;#59; x&amp;#60;&amp;#61;3&amp;#59; x&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;            for &amp;#40;var y&amp;#61;-3&amp;#59; y&amp;#60;&amp;#61;3&amp;#59; y&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;                map.push&amp;#40;&amp;#123;&lt;br /&gt;                    centerp&amp;#58; &amp;#123; x&amp;#58; x &amp;#42; 100, y&amp;#58; y &amp;#42; 100, z&amp;#58; 0 &amp;#125;,&lt;br /&gt;                    orientation&amp;#58; &amp;#123;alphaD&amp;#58; 90, betaD&amp;#58; 0, gammaD&amp;#58; 0&amp;#125;,&lt;br /&gt;                    size&amp;#58; &amp;#123;w&amp;#58;100,h&amp;#58;100&amp;#125;,&lt;br /&gt;                    init&amp;#58; function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;                        var basesheet &amp;#61; new sheetengine.BaseSheet&amp;#40;this.centerp, this.orientation, this.size&amp;#41;&amp;#59;&lt;br /&gt;                        basesheet.color &amp;#61; &amp;#39;&amp;#35;5D7E36&amp;#39;&amp;#59;&lt;br /&gt;                        return basesheet&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        &amp;#47;&amp;#47; define some sheets&lt;br /&gt;        for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;50&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;            &amp;#40;function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;                var w &amp;#61; Math.random&amp;#40;&amp;#41;&amp;#42;10 &amp;#43; 30&amp;#59;&lt;br /&gt;                var z &amp;#61; w&amp;#59;&lt;br /&gt;                var c &amp;#61; Math.floor&amp;#40;Math.random&amp;#40;&amp;#41;&amp;#42;3&amp;#41;&amp;#59;&lt;br /&gt;                map.push&amp;#40;&amp;#123;&lt;br /&gt;                    centerp&amp;#58; &amp;#123;x&amp;#58;Math.random&amp;#40;&amp;#41;&amp;#42;1000 - 500, y&amp;#58;Math.random&amp;#40;&amp;#41;&amp;#42;1000 - 500, z&amp;#58;z&amp;#125;,&lt;br /&gt;                    orientation&amp;#58; &amp;#123;alphaD&amp;#58;c &amp;#61;&amp;#61; 0 &amp;#63; 90 &amp;#58; 0, betaD&amp;#58;c &amp;#61;&amp;#61; 1 &amp;#63; 90 &amp;#58; 0, gammaD&amp;#58;c &amp;#61;&amp;#61; 2 &amp;#63; 90 &amp;#58; 0&amp;#125;,&lt;br /&gt;                    size&amp;#58; &amp;#123;w&amp;#58;w,h&amp;#58;w&amp;#125;,&lt;br /&gt;                    init&amp;#58; function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;                        var sheet &amp;#61; new sheetengine.Sheet&amp;#40;this.centerp, this.orientation, this.size&amp;#41;&amp;#59;&lt;br /&gt;                        sheet.context.fillStyle &amp;#61; c &amp;#61;&amp;#61; 0 &amp;#63; &amp;#39;&amp;#35;006&amp;#39; &amp;#58; c &amp;#61;&amp;#61; 1 &amp;#63; &amp;#39;&amp;#35;600&amp;#39; &amp;#58; &amp;#39;&amp;#35;060&amp;#39;&amp;#59;&lt;br /&gt;                        sheet.context.fillRect&amp;#40;0,0,w,w&amp;#41;&amp;#59;&lt;br /&gt;                        return sheet&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&amp;#41;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        sheetengine.scene.setCenter&amp;#40;centertile&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        loadAndRemoveSheets&amp;#40;&amp;#123;x&amp;#58;0,y&amp;#58;0&amp;#125;, centertile&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        &amp;#47;&amp;#47; draw initial scene&lt;br /&gt;        sheetengine.calc.calculateAllSheets&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        sheetengine.drawing.drawScene&amp;#40;true&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        window.onkeydown &amp;#61; function&amp;#40;e&amp;#41;&amp;#123;&lt;br /&gt;            move&amp;#40; e.keyCode &amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;        window.onkeyup &amp;#61; function&amp;#40;e&amp;#41;&amp;#123;&lt;br /&gt;            move&amp;#40; e.keyCode &amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;        function move&amp;#40;key&amp;#41; &amp;#123;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47;var oldcentertile &amp;#61; &amp;#36;.extend&amp;#40; &amp;#123;&amp;#125;, centertile &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            var newcentertile &amp;#61; &amp;#123;x&amp;#58;0,y&amp;#58;0,z&amp;#58;0&amp;#125;&lt;br /&gt;            if &amp;#40;key &amp;#61;&amp;#61; 87&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.y -&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125; else if &amp;#40;key &amp;#61;&amp;#61; 83&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.y &amp;#43;&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125; else if &amp;#40;key &amp;#61;&amp;#61; 65&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.x &amp;#43;&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125; else if &amp;#40;key &amp;#61;&amp;#61; 68&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.x -&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            loadAndRemoveSheets&amp;#40; centertile, newcentertile &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            sheetengine.scene.setCenter&amp;#40;newcentertile&amp;#41;&amp;#59;&lt;br /&gt;            sheetengine.calc.calculateChangedSheets&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            sheetengine.drawing.drawScene&amp;#40;true&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47;sheetengine.drawing.drawScene&amp;#40;true&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        function loadAndRemoveSheets&amp;#40;oldcentertile, centertile&amp;#41; &amp;#123;&lt;br /&gt;            var boundary &amp;#61; &amp;#123; xmin&amp;#58; centertile.x &amp;#42; 100 - 300, xmax&amp;#58; centertile.x &amp;#42; 100 &amp;#43; 300, ymin&amp;#58; centertile.y &amp;#42; 100 - 300, ymax&amp;#58; centertile.y &amp;#42; 100 &amp;#43; 300 &amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;            console.log&amp;#40; boundary &amp;#41;&amp;#59;&lt;br /&gt;            console.log&amp;#40; oldcentertile &amp;#41;&amp;#59;&lt;br /&gt;            console.log&amp;#40; centertile &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; remove sheets that are far&lt;br /&gt;            for &amp;#40;var i&amp;#61;0&amp;#59;i&amp;#60;map.length&amp;#59;i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;                var sheetinfo &amp;#61; map&amp;#91;i&amp;#93;&amp;#59;&lt;br /&gt;                if &amp;#40;sheetinfo.centerp.x &amp;#60; boundary.xmin &amp;#124;&amp;#124; sheetinfo.centerp.x &amp;#62; boundary.xmax &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#60; boundary.ymin &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#62; boundary.ymax&amp;#41; &amp;#123;&lt;br /&gt;                    if &amp;#40;sheetinfo.added&amp;#41; &amp;#123;&lt;br /&gt;                        sheetinfo.sheet.destroy&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                        sheetinfo.added &amp;#61; false&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; add new sheets&lt;br /&gt;            for &amp;#40;var i&amp;#61;0&amp;#59;i&amp;#60;map.length&amp;#59;i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;                var sheetinfo &amp;#61; map&amp;#91;i&amp;#93;&amp;#59;&lt;br /&gt;                if &amp;#40;sheetinfo.centerp.x &amp;#60; boundary.xmin &amp;#124;&amp;#124; sheetinfo.centerp.x &amp;#62; boundary.xmax &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#60; boundary.ymin &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#62; boundary.ymax&amp;#41;&lt;br /&gt;                    continue&amp;#59;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;&amp;#33;sheetinfo.added&amp;#41; &amp;#123;&lt;br /&gt;                    sheetinfo.sheet &amp;#61; sheetinfo.init&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                    sheetinfo.added &amp;#61; true&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; translate background&lt;br /&gt;            sheetengine.scene.translateBackground&amp;#40;&lt;br /&gt;                &amp;#123;x&amp;#58;oldcentertile.x&amp;#42;100,y&amp;#58;oldcentertile.y&amp;#42;100&amp;#125;,&lt;br /&gt;                &amp;#123;x&amp;#58;centertile.x&amp;#42;100,y&amp;#58;centertile.y&amp;#42;100&amp;#125;&lt;br /&gt;            &amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;    &amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;Comments: Load.png</description><author>Freid001</author><pubDate>Sun, 03 Jan 2016 15:46:39 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Moving around in a large scene with no character just asdw keys? [7] 20160103034639P</guid></item><item><title>Created Unassigned: Moving around in a large scene with no character just asdw keys? [7]</title><link>http://sheetengine.codeplex.com/workitem/7</link><description>Hi, &lt;br /&gt;&lt;br /&gt;I&amp;#39;m new to sheetengine, and just having a few issues rendering large scenes. &lt;br /&gt;&lt;br /&gt;I am using the loadAndRemoveSheets&amp;#40;&amp;#41; function like in the example files. I would like to be able to move around inside the world but without a character. I have created some action listeners for the asdw keys, when I use the asdw keys to move around the correct tiles are being created and destroyed. But the new tile does not position in the center of the canvas. Is it possible to get this newly drawn center tile to be displayed in the center of the canvas&amp;#63; I have tried sheetengine.scene.setCenter&amp;#40;targetp, targetpuv&amp;#41;&amp;#59; but had little success. &lt;br /&gt;&lt;br /&gt;Thanks for any help&amp;#33;&lt;br /&gt;&lt;br /&gt;CODE&amp;#58; &lt;br /&gt;&lt;br /&gt;&amp;#36;&amp;#40;function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;        var canvasElement &amp;#61; document.getElementById&amp;#40;&amp;#39;maincanvas&amp;#39;&amp;#41;&amp;#59;&lt;br /&gt;        sheetengine.scene.init&amp;#40;canvasElement, &amp;#123;w&amp;#58;900,h&amp;#58;500&amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        var centertile &amp;#61; &amp;#123;x&amp;#58;0,y&amp;#58;0,z&amp;#58;0&amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;        &amp;#47;&amp;#47; define some basesheets&lt;br /&gt;        var map &amp;#61; &amp;#91;&amp;#93;&amp;#59;&lt;br /&gt;        for &amp;#40;var x&amp;#61;-3&amp;#59; x&amp;#60;&amp;#61;3&amp;#59; x&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;            for &amp;#40;var y&amp;#61;-3&amp;#59; y&amp;#60;&amp;#61;3&amp;#59; y&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;                map.push&amp;#40;&amp;#123;&lt;br /&gt;                    centerp&amp;#58; &amp;#123; x&amp;#58; x &amp;#42; 100, y&amp;#58; y &amp;#42; 100, z&amp;#58; 0 &amp;#125;,&lt;br /&gt;                    orientation&amp;#58; &amp;#123;alphaD&amp;#58; 90, betaD&amp;#58; 0, gammaD&amp;#58; 0&amp;#125;,&lt;br /&gt;                    size&amp;#58; &amp;#123;w&amp;#58;100,h&amp;#58;100&amp;#125;,&lt;br /&gt;                    init&amp;#58; function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;                        var basesheet &amp;#61; new sheetengine.BaseSheet&amp;#40;this.centerp, this.orientation, this.size&amp;#41;&amp;#59;&lt;br /&gt;                        basesheet.color &amp;#61; &amp;#39;&amp;#35;5D7E36&amp;#39;&amp;#59;&lt;br /&gt;                        return basesheet&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        &amp;#47;&amp;#47; define some sheets&lt;br /&gt;        for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;50&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;            &amp;#40;function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;                var w &amp;#61; Math.random&amp;#40;&amp;#41;&amp;#42;10 &amp;#43; 30&amp;#59;&lt;br /&gt;                var z &amp;#61; w&amp;#59;&lt;br /&gt;                var c &amp;#61; Math.floor&amp;#40;Math.random&amp;#40;&amp;#41;&amp;#42;3&amp;#41;&amp;#59;&lt;br /&gt;                map.push&amp;#40;&amp;#123;&lt;br /&gt;                    centerp&amp;#58; &amp;#123;x&amp;#58;Math.random&amp;#40;&amp;#41;&amp;#42;1000 - 500, y&amp;#58;Math.random&amp;#40;&amp;#41;&amp;#42;1000 - 500, z&amp;#58;z&amp;#125;,&lt;br /&gt;                    orientation&amp;#58; &amp;#123;alphaD&amp;#58;c &amp;#61;&amp;#61; 0 &amp;#63; 90 &amp;#58; 0, betaD&amp;#58;c &amp;#61;&amp;#61; 1 &amp;#63; 90 &amp;#58; 0, gammaD&amp;#58;c &amp;#61;&amp;#61; 2 &amp;#63; 90 &amp;#58; 0&amp;#125;,&lt;br /&gt;                    size&amp;#58; &amp;#123;w&amp;#58;w,h&amp;#58;w&amp;#125;,&lt;br /&gt;                    init&amp;#58; function&amp;#40;&amp;#41; &amp;#123;&lt;br /&gt;                        var sheet &amp;#61; new sheetengine.Sheet&amp;#40;this.centerp, this.orientation, this.size&amp;#41;&amp;#59;&lt;br /&gt;                        sheet.context.fillStyle &amp;#61; c &amp;#61;&amp;#61; 0 &amp;#63; &amp;#39;&amp;#35;006&amp;#39; &amp;#58; c &amp;#61;&amp;#61; 1 &amp;#63; &amp;#39;&amp;#35;600&amp;#39; &amp;#58; &amp;#39;&amp;#35;060&amp;#39;&amp;#59;&lt;br /&gt;                        sheet.context.fillRect&amp;#40;0,0,w,w&amp;#41;&amp;#59;&lt;br /&gt;                        return sheet&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&amp;#41;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        sheetengine.scene.setCenter&amp;#40;centertile&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        loadAndRemoveSheets&amp;#40;&amp;#123;x&amp;#58;0,y&amp;#58;0&amp;#125;, centertile&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        &amp;#47;&amp;#47; draw initial scene&lt;br /&gt;        sheetengine.calc.calculateAllSheets&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;        sheetengine.drawing.drawScene&amp;#40;true&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        window.onkeydown &amp;#61; function&amp;#40;e&amp;#41;&amp;#123;&lt;br /&gt;            move&amp;#40; e.keyCode &amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;        window.onkeyup &amp;#61; function&amp;#40;e&amp;#41;&amp;#123;&lt;br /&gt;            move&amp;#40; e.keyCode &amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;        function move&amp;#40;key&amp;#41; &amp;#123;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47;var oldcentertile &amp;#61; &amp;#36;.extend&amp;#40; &amp;#123;&amp;#125;, centertile &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            var newcentertile &amp;#61; &amp;#123;x&amp;#58;0,y&amp;#58;0,z&amp;#58;0&amp;#125;&lt;br /&gt;            if &amp;#40;key &amp;#61;&amp;#61; 87&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.y -&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125; else if &amp;#40;key &amp;#61;&amp;#61; 83&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.y &amp;#43;&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125; else if &amp;#40;key &amp;#61;&amp;#61; 65&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.x &amp;#43;&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125; else if &amp;#40;key &amp;#61;&amp;#61; 68&amp;#41; &amp;#123;&lt;br /&gt;                newcentertile.x -&amp;#61; 1&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            loadAndRemoveSheets&amp;#40; centertile, newcentertile &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            sheetengine.scene.setCenter&amp;#40;newcentertile&amp;#41;&amp;#59;&lt;br /&gt;            sheetengine.calc.calculateChangedSheets&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;            sheetengine.drawing.drawScene&amp;#40;true&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47;sheetengine.drawing.drawScene&amp;#40;true&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;        function loadAndRemoveSheets&amp;#40;oldcentertile, centertile&amp;#41; &amp;#123;&lt;br /&gt;            var boundary &amp;#61; &amp;#123; xmin&amp;#58; centertile.x &amp;#42; 100 - 300, xmax&amp;#58; centertile.x &amp;#42; 100 &amp;#43; 300, ymin&amp;#58; centertile.y &amp;#42; 100 - 300, ymax&amp;#58; centertile.y &amp;#42; 100 &amp;#43; 300 &amp;#125;&amp;#59;&lt;br /&gt;&lt;br /&gt;            console.log&amp;#40; boundary &amp;#41;&amp;#59;&lt;br /&gt;            console.log&amp;#40; oldcentertile &amp;#41;&amp;#59;&lt;br /&gt;            console.log&amp;#40; centertile &amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; remove sheets that are far&lt;br /&gt;            for &amp;#40;var i&amp;#61;0&amp;#59;i&amp;#60;map.length&amp;#59;i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;                var sheetinfo &amp;#61; map&amp;#91;i&amp;#93;&amp;#59;&lt;br /&gt;                if &amp;#40;sheetinfo.centerp.x &amp;#60; boundary.xmin &amp;#124;&amp;#124; sheetinfo.centerp.x &amp;#62; boundary.xmax &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#60; boundary.ymin &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#62; boundary.ymax&amp;#41; &amp;#123;&lt;br /&gt;                    if &amp;#40;sheetinfo.added&amp;#41; &amp;#123;&lt;br /&gt;                        sheetinfo.sheet.destroy&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                        sheetinfo.added &amp;#61; false&amp;#59;&lt;br /&gt;                    &amp;#125;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; add new sheets&lt;br /&gt;            for &amp;#40;var i&amp;#61;0&amp;#59;i&amp;#60;map.length&amp;#59;i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;                var sheetinfo &amp;#61; map&amp;#91;i&amp;#93;&amp;#59;&lt;br /&gt;                if &amp;#40;sheetinfo.centerp.x &amp;#60; boundary.xmin &amp;#124;&amp;#124; sheetinfo.centerp.x &amp;#62; boundary.xmax &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#60; boundary.ymin &amp;#124;&amp;#124; sheetinfo.centerp.y &amp;#62; boundary.ymax&amp;#41;&lt;br /&gt;                    continue&amp;#59;&lt;br /&gt;&lt;br /&gt;                if &amp;#40;&amp;#33;sheetinfo.added&amp;#41; &amp;#123;&lt;br /&gt;                    sheetinfo.sheet &amp;#61; sheetinfo.init&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;                    sheetinfo.added &amp;#61; true&amp;#59;&lt;br /&gt;                &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            &amp;#47;&amp;#47; translate background&lt;br /&gt;            sheetengine.scene.translateBackground&amp;#40;&lt;br /&gt;                &amp;#123;x&amp;#58;oldcentertile.x&amp;#42;100,y&amp;#58;oldcentertile.y&amp;#42;100&amp;#125;,&lt;br /&gt;                &amp;#123;x&amp;#58;centertile.x&amp;#42;100,y&amp;#58;centertile.y&amp;#42;100&amp;#125;&lt;br /&gt;            &amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;&lt;br /&gt;    &amp;#125;&amp;#41;&amp;#59;&lt;br /&gt;</description><author>Freid001</author><pubDate>Sun, 03 Jan 2016 15:43:59 GMT</pubDate><guid isPermaLink="false">Created Unassigned: Moving around in a large scene with no character just asdw keys? [7] 20160103034359P</guid></item><item><title>Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;&lt;br /&gt;PS&amp;#58; A complete refresh works by the way..&lt;br /&gt;Comments: Sorry, I really don&amp;#39;t understand how this is possible. If currentsheet is undefined then it should throw an error already before that line. If intersectors is undefined it should simply skip to the next line. Try changing line 1418 to this&amp;#10;if &amp;#40;currentsheet.intersectors&amp;#41; &amp;#123;&amp;#10;instead of this&amp;#10;if &amp;#40;currentsheet.intersectors &amp;#33;&amp;#61; null&amp;#41; &amp;#123;</description><author>dobsonl</author><pubDate>Thu, 04 Sep 2014 05:52:34 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140904055234A</guid></item><item><title>Commented Unassigned: Bug in ordering sheets [5]</title><link>http://sheetengine.codeplex.com/workitem/5</link><description>Hello, we would like to inform you about a bug we found in the code. The problem resides in function getOrderedList&amp;#40;&amp;#41;. We run into a problem if nothing has changed in an iteration of for&amp;#40; &amp;#59;&amp;#59; &amp;#41; loop. There is the following code fragment &amp;#40;lines 1259-1273&amp;#41;&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;if &amp;#40;no change&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;var zmax &amp;#61; -10000&amp;#59;&lt;br /&gt;&amp;#9;for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;unordered.length&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;if &amp;#40;&amp;#40;i &amp;#61;&amp;#61; 0&amp;#41; &amp;#124;&amp;#124; &amp;#40;sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax &amp;#62; zmax&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;maxidx &amp;#61; i&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;zmax &amp;#61; sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;...&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;There are two bugs, in fact. The first one is a missing declaration of &amp;#34;maxidx&amp;#34; which is then considered global and its value persists to subsequent function calls. The other one is untreated special condition, when there is exactly one item in &amp;#34;unordered&amp;#34; and &amp;#40;who knows&amp;#63;&amp;#41; its data.zmax has default value of -10000. Such a condition results in an indefinite loop. Or, if maxidx declaration is present, it results in a crash in drawSheets, because orderedPolygons contains &amp;#34;undefined&amp;#34; item. We suggest to apply following change&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;if &amp;#40;nochange&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;var zmax &amp;#61; -10000&amp;#59;&lt;br /&gt;&amp;#9;var maxidx &amp;#61; -1&amp;#59;&lt;br /&gt;&amp;#9;for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;unordered.length&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;if &amp;#40;&amp;#40;i &amp;#61;&amp;#61; 0&amp;#41; &amp;#124;&amp;#124; &amp;#40;sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax &amp;#62; zmax&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;maxidx &amp;#61; i&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;zmax &amp;#61; sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;var key &amp;#61; &amp;#39;k&amp;#39;&amp;#43;unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;ordered&amp;#91;key&amp;#93; &amp;#61; unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;ordered&amp;#91;ordered.length&amp;#93; &amp;#61; unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;unordered.splice&amp;#40;maxidx, 1&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;if &amp;#40;unordered.length &amp;#61;&amp;#61; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;break&amp;#59;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Comments: No, I haven&amp;#39;t tested it, but looks ok to me.</description><author>dobsonl</author><pubDate>Thu, 04 Sep 2014 05:42:54 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug in ordering sheets [5] 20140904054254A</guid></item><item><title>Commented Unassigned: Bug in ordering sheets [5]</title><link>http://sheetengine.codeplex.com/workitem/5</link><description>Hello, we would like to inform you about a bug we found in the code. The problem resides in function getOrderedList&amp;#40;&amp;#41;. We run into a problem if nothing has changed in an iteration of for&amp;#40; &amp;#59;&amp;#59; &amp;#41; loop. There is the following code fragment &amp;#40;lines 1259-1273&amp;#41;&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;if &amp;#40;no change&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;var zmax &amp;#61; -10000&amp;#59;&lt;br /&gt;&amp;#9;for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;unordered.length&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;if &amp;#40;&amp;#40;i &amp;#61;&amp;#61; 0&amp;#41; &amp;#124;&amp;#124; &amp;#40;sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax &amp;#62; zmax&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;maxidx &amp;#61; i&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;zmax &amp;#61; sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;...&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;There are two bugs, in fact. The first one is a missing declaration of &amp;#34;maxidx&amp;#34; which is then considered global and its value persists to subsequent function calls. The other one is untreated special condition, when there is exactly one item in &amp;#34;unordered&amp;#34; and &amp;#40;who knows&amp;#63;&amp;#41; its data.zmax has default value of -10000. Such a condition results in an indefinite loop. Or, if maxidx declaration is present, it results in a crash in drawSheets, because orderedPolygons contains &amp;#34;undefined&amp;#34; item. We suggest to apply following change&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;if &amp;#40;nochange&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;var zmax &amp;#61; -10000&amp;#59;&lt;br /&gt;&amp;#9;var maxidx &amp;#61; -1&amp;#59;&lt;br /&gt;&amp;#9;for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;unordered.length&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;if &amp;#40;&amp;#40;i &amp;#61;&amp;#61; 0&amp;#41; &amp;#124;&amp;#124; &amp;#40;sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax &amp;#62; zmax&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;maxidx &amp;#61; i&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;zmax &amp;#61; sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;var key &amp;#61; &amp;#39;k&amp;#39;&amp;#43;unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;ordered&amp;#91;key&amp;#93; &amp;#61; unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;ordered&amp;#91;ordered.length&amp;#93; &amp;#61; unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;unordered.splice&amp;#40;maxidx, 1&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;if &amp;#40;unordered.length &amp;#61;&amp;#61; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;break&amp;#59;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Comments: Levente, have you tested out this fix&amp;#63; Do you think it&amp;#39;s good to include it in the source&amp;#63;</description><author>RohanDeshpande</author><pubDate>Thu, 04 Sep 2014 02:04:34 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug in ordering sheets [5] 20140904020434A</guid></item><item><title>Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;&lt;br /&gt;PS&amp;#58; A complete refresh works by the way..&lt;br /&gt;Comments: Unfortunately I still get this error when I perform redrawings... But not every time.&amp;#10;No clue what the problem is&amp;#63;&amp;#10;&amp;#10;TypeError&amp;#58; currentsheet.intersectors is undefined&amp;#10;Stack-Trace&amp;#58;&amp;#10;gatherDirtySheets&amp;#64;file&amp;#58;&amp;#47;&amp;#47;&amp;#47;path to&amp;#47;sheetengine.js&amp;#58;1419&amp;#58;22&amp;#10;calculateChangedSheets&amp;#64;file&amp;#58;&amp;#47;&amp;#47;&amp;#47;path to sheetengine.js&amp;#58;1575&amp;#58;9&amp;#10;Map._drawMap&amp;#47;&amp;#60;&amp;#64;file&amp;#58;&amp;#47;&amp;#47;&amp;#47;path to file.js&amp;#58;514&amp;#58;5</description><author>Bagorolin</author><pubDate>Wed, 06 Aug 2014 09:08:58 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140806090858A</guid></item><item><title>Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;&lt;br /&gt;PS&amp;#58; A complete refresh works by the way..&lt;br /&gt;Comments: I use Firefox on Win8. I don&amp;#39;t use a backend. Just the file with html&amp;#47;css and javascript</description><author>Bagorolin</author><pubDate>Tue, 15 Jul 2014 06:26:24 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140715062624A</guid></item><item><title>Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;&lt;br /&gt;PS&amp;#58; A complete refresh works by the way..&lt;br /&gt;Comments: No, it doesn&amp;#39;t. What is your test environment&amp;#63; What type of browser do you use&amp;#63;</description><author>dobsonl</author><pubDate>Mon, 14 Jul 2014 15:17:37 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140714031737P</guid></item><item><title>Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;&lt;br /&gt;PS&amp;#58; A complete refresh works by the way..&lt;br /&gt;Comments: Well, I&amp;#39;m not sure, but it looks like it works fine if I perform some retrys in a try&amp;#47;catch or just wait for a milisecond with setTimeOut.. Does this make sense to you&amp;#63;</description><author>Bagorolin</author><pubDate>Mon, 14 Jul 2014 14:42:27 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140714024227P</guid></item><item><title>Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;&lt;br /&gt;PS&amp;#58; A complete refresh works by the way..&lt;br /&gt;Comments: ok now for the last time..&amp;#10;it&amp;#39;s line 1418 at currentsheet.intersectors &amp;#33;&amp;#61; null</description><author>Bagorolin</author><pubDate>Mon, 14 Jul 2014 12:36:57 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140714123657P</guid></item><item><title>Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;&lt;br /&gt;PS&amp;#58; A complete refresh works by the way..&lt;br /&gt;Comments: -.- why can&amp;#39;t i edit a comment...&amp;#10;it&amp;#39;s line 1449&amp;#33;&amp;#33;</description><author>Bagorolin</author><pubDate>Mon, 14 Jul 2014 12:35:53 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140714123553P</guid></item><item><title>Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;&lt;br /&gt;PS&amp;#58; A complete refresh works by the way..&lt;br /&gt;Comments: oh sorry, i forgot this..&amp;#10;its line 1149 in gatherDirtySheets&amp;#40;&amp;#41;</description><author>Bagorolin</author><pubDate>Mon, 14 Jul 2014 12:35:16 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140714123516P</guid></item><item><title>Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;&lt;br /&gt;PS&amp;#58; A complete refresh works by the way..&lt;br /&gt;Comments: Do you happen to have the line number where the problem occurs&amp;#63;</description><author>dobsonl</author><pubDate>Mon, 14 Jul 2014 11:57:53 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140714115753A</guid></item><item><title>Edited Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;&lt;br /&gt;PS&amp;#58; A complete refresh works by the way..&lt;br /&gt;</description><author>Bagorolin</author><pubDate>Mon, 14 Jul 2014 10:44:08 GMT</pubDate><guid isPermaLink="false">Edited Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140714104408A</guid></item><item><title>Edited Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;</description><author>Bagorolin</author><pubDate>Mon, 14 Jul 2014 10:40:13 GMT</pubDate><guid isPermaLink="false">Edited Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140714104013A</guid></item><item><title>Created Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6]</title><link>http://sheetengine.codeplex.com/workitem/6</link><description>Hello&lt;br /&gt;&lt;br /&gt;sometimes I get this rrror&lt;br /&gt;&amp;#62; TypeError&amp;#58; currentsheet.intersectors is undefined&lt;br /&gt;after I performed a change at a sheet and now want to redraw. Of course I call calculateChangedSheets&amp;#40;&amp;#41; before I call the redraw method.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t yet know when and how it exactly occurs. I can&amp;#39;t reproduce this error intetionally. It just sometimes occur and sometimes not at likely changes..&lt;br /&gt;&lt;br /&gt;Is ist a bug or am I doing something wrong&amp;#63;&lt;br /&gt;</description><author>Bagorolin</author><pubDate>Mon, 14 Jul 2014 10:39:57 GMT</pubDate><guid isPermaLink="false">Created Unassigned: Bug? at calculateChangedSheets - currentsheet.intersectors is undefined [6] 20140714103957A</guid></item><item><title>Commented Unassigned: Bug in ordering sheets [5]</title><link>http://sheetengine.codeplex.com/workitem/5</link><description>Hello, we would like to inform you about a bug we found in the code. The problem resides in function getOrderedList&amp;#40;&amp;#41;. We run into a problem if nothing has changed in an iteration of for&amp;#40; &amp;#59;&amp;#59; &amp;#41; loop. There is the following code fragment &amp;#40;lines 1259-1273&amp;#41;&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;if &amp;#40;no change&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;var zmax &amp;#61; -10000&amp;#59;&lt;br /&gt;&amp;#9;for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;unordered.length&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;if &amp;#40;&amp;#40;i &amp;#61;&amp;#61; 0&amp;#41; &amp;#124;&amp;#124; &amp;#40;sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax &amp;#62; zmax&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;maxidx &amp;#61; i&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;zmax &amp;#61; sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;...&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;There are two bugs, in fact. The first one is a missing declaration of &amp;#34;maxidx&amp;#34; which is then considered global and its value persists to subsequent function calls. The other one is untreated special condition, when there is exactly one item in &amp;#34;unordered&amp;#34; and &amp;#40;who knows&amp;#63;&amp;#41; its data.zmax has default value of -10000. Such a condition results in an indefinite loop. Or, if maxidx declaration is present, it results in a crash in drawSheets, because orderedPolygons contains &amp;#34;undefined&amp;#34; item. We suggest to apply following change&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;if &amp;#40;nochange&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;var zmax &amp;#61; -10000&amp;#59;&lt;br /&gt;&amp;#9;var maxidx &amp;#61; -1&amp;#59;&lt;br /&gt;&amp;#9;for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;unordered.length&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;if &amp;#40;&amp;#40;i &amp;#61;&amp;#61; 0&amp;#41; &amp;#124;&amp;#124; &amp;#40;sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax &amp;#62; zmax&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;maxidx &amp;#61; i&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;zmax &amp;#61; sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;var key &amp;#61; &amp;#39;k&amp;#39;&amp;#43;unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;ordered&amp;#91;key&amp;#93; &amp;#61; unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;ordered&amp;#91;ordered.length&amp;#93; &amp;#61; unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;unordered.splice&amp;#40;maxidx, 1&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;if &amp;#40;unordered.length &amp;#61;&amp;#61; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;break&amp;#59;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Comments: Thanks for the report. This is definitely a bug.</description><author>dobsonl</author><pubDate>Thu, 01 May 2014 18:37:10 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Bug in ordering sheets [5] 20140501063710P</guid></item><item><title>Created Unassigned: Bug in ordering sheets [5]</title><link>http://sheetengine.codeplex.com/workitem/5</link><description>Hello, we would like to inform you about a bug we found in the code. The problem resides in function getOrderedList&amp;#40;&amp;#41;. We run into a problem if nothing has changed in an iteration of for&amp;#40; &amp;#59;&amp;#59; &amp;#41; loop. There is the following code fragment &amp;#40;lines 1259-1273&amp;#41;&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;if &amp;#40;no change&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;var zmax &amp;#61; -10000&amp;#59;&lt;br /&gt;&amp;#9;for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;unordered.length&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;if &amp;#40;&amp;#40;i &amp;#61;&amp;#61; 0&amp;#41; &amp;#124;&amp;#124; &amp;#40;sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax &amp;#62; zmax&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;maxidx &amp;#61; i&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;zmax &amp;#61; sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;...&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;There are two bugs, in fact. The first one is a missing declaration of &amp;#34;maxidx&amp;#34; which is then considered global and its value persists to subsequent function calls. The other one is untreated special condition, when there is exactly one item in &amp;#34;unordered&amp;#34; and &amp;#40;who knows&amp;#63;&amp;#41; its data.zmax has default value of -10000. Such a condition results in an indefinite loop. Or, if maxidx declaration is present, it results in a crash in drawSheets, because orderedPolygons contains &amp;#34;undefined&amp;#34; item. We suggest to apply following change&amp;#58;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;if &amp;#40;nochange&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;var zmax &amp;#61; -10000&amp;#59;&lt;br /&gt;&amp;#9;var maxidx &amp;#61; -1&amp;#59;&lt;br /&gt;&amp;#9;for &amp;#40;var i&amp;#61;0&amp;#59; i&amp;#60;unordered.length&amp;#59; i&amp;#43;&amp;#43;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;if &amp;#40;&amp;#40;i &amp;#61;&amp;#61; 0&amp;#41; &amp;#124;&amp;#124; &amp;#40;sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax &amp;#62; zmax&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;maxidx &amp;#61; i&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;zmax &amp;#61; sheetengine.polygons&amp;#91;unordered&amp;#91;i&amp;#93;&amp;#93;.data.zmax&amp;#59;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#9;var key &amp;#61; &amp;#39;k&amp;#39;&amp;#43;unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;ordered&amp;#91;key&amp;#93; &amp;#61; unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;&amp;#47;&amp;#47;ordered&amp;#91;ordered.length&amp;#93; &amp;#61; unordered&amp;#91;maxidx&amp;#93;&amp;#59;&lt;br /&gt;&amp;#9;unordered.splice&amp;#40;maxidx, 1&amp;#41;&amp;#59;&lt;br /&gt;&amp;#9;if &amp;#40;unordered.length &amp;#61;&amp;#61; 0&amp;#41;&lt;br /&gt;&amp;#9;&amp;#9;break&amp;#59;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;</description><author>radius_cz</author><pubDate>Thu, 01 May 2014 10:40:09 GMT</pubDate><guid isPermaLink="false">Created Unassigned: Bug in ordering sheets [5] 20140501104009A</guid></item><item><title>Commented Unassigned: How to set light source in sheet engine [4]</title><link>http://sheetengine.codeplex.com/workitem/4</link><description>I want to adjust light source but i don&amp;#39;t know how to calculate its parameters&amp;#63;&lt;br /&gt;Comments: See discussion&amp;#58; &amp;#91;https&amp;#58;&amp;#47;&amp;#47;sheetengine.codeplex.com&amp;#47;discussions&amp;#47;462403&amp;#93;&amp;#40;https&amp;#58;&amp;#47;&amp;#47;sheetengine.codeplex.com&amp;#47;discussions&amp;#47;462403&amp;#41;</description><author>dobsonl</author><pubDate>Wed, 16 Oct 2013 07:09:48 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: How to set light source in sheet engine [4] 20131016070948A</guid></item></channel></rss>