preparing property dialog
This commit is contained in:
@@ -75,6 +75,23 @@ svg text{
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
#tile-properties{
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
bottom: 10px;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
.closebtn{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
font-size: 30px;
|
||||
background: gray;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#Eraser polygon{
|
||||
stroke: red;
|
||||
}
|
||||
@@ -31,16 +31,34 @@ function addTile(x,y){
|
||||
}
|
||||
|
||||
function bodyClick(ev){
|
||||
console.log('bodyClick:',ev);
|
||||
//console.log('bodyClick:',ev);
|
||||
switch (mode){
|
||||
case undefined:
|
||||
case null: return;
|
||||
case undefined:
|
||||
case null:
|
||||
return clickTile(ev.clientX,ev.clientY);
|
||||
case ADD:
|
||||
return addTile(ev.clientX,ev.clientY);
|
||||
}
|
||||
console.log(ev.clientX,ev.clientY);
|
||||
}
|
||||
|
||||
function clickTile(x,y){
|
||||
console.log("clickTile:",x,y);
|
||||
x = Math.floor(x/SQUARE);
|
||||
y = Math.floor(y/SQUARE);
|
||||
if ($('#tile-'+x+'-'+y).length > 0){
|
||||
$.ajax({
|
||||
url : PLAN,
|
||||
method : POST,
|
||||
data : {action:'openProps',x:x,y:y},
|
||||
success: function(resp){
|
||||
$('body').append($(resp));
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function closeMenu(ev){
|
||||
console.log('closeMenu:',ev);
|
||||
if (selected != null) $(selected).css('border','');
|
||||
|
||||
Reference in New Issue
Block a user