diff --git a/MapBuilderForWeb/BuilderVisuals.js b/MapBuilderForWeb/BuilderVisuals.js index 6bf189c..8060ed8 100644 --- a/MapBuilderForWeb/BuilderVisuals.js +++ b/MapBuilderForWeb/BuilderVisuals.js @@ -79,6 +79,8 @@ // PRINTERS //////////////////////////////////////////////////////////////////////// + var previousLevel; + function printHoverVisuals(){ //Read all from current placing info let shape = listOfShapes[currentItemPlacingInfo.itemType]; @@ -96,10 +98,11 @@ //console.log(new Vector2Array(coordenates)); - printVisualsOfCoordenates( previusCoordenates , clearedGridColor ); + printVisualsOfCoordenates( previusCoordenates , clearedGridColor, previousLevel ); printVisualsOfCoordenates( coordenates, itemShadowColor ); previusCoordenates = coordenates; + previousLevel = levels[ currentItemPlacingInfo.level.x ][ currentItemPlacingInfo.level.y ]; } var _x=0, _y=0; diff --git a/MapBuilderForWeb/MapBuilder.js b/MapBuilderForWeb/MapBuilder.js index 4e4596e..7b9b943 100644 --- a/MapBuilderForWeb/MapBuilder.js +++ b/MapBuilderForWeb/MapBuilder.js @@ -55,8 +55,11 @@ - function UpdateOccupancy(coordenates, state){ - let occupancyMap = occupancyMaps[currentItemPlacingInfo.level.x][currentItemPlacingInfo.level.y]; + function UpdateOccupancy(coordenates, state, map){ + let occupancyMap = map; + if( occupancyMap == null ) + occupancyMap = occupancyMaps[currentItemPlacingInfo.level.x][currentItemPlacingInfo.level.y]; + for(var i=0; i - +
@@ -96,6 +96,9 @@ e.preventDefault() }) + //custom scale to window size + document.body.style.zoom = (window.innerWidth*0.07782) + "%"; + //Starts showing map editor while hidning shapes editor GoToMapEditor(); //GoToShapesEditor(); @@ -138,7 +141,7 @@ //Add functionality to the level var tablerows = level.getElementsByTagName("tbody")[0].getElementsByTagName("tr"); for (let i=0; i shapeIndex){