소스 검색

Test in JS for nodes which already exists.

master
Pete Shadbolt 7 년 전
부모
커밋
f1a7498f9c
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. +4
    -0
      abp/static/scripts/editor.js

+ 4
- 0
abp/static/scripts/editor.js 파일 보기

@@ -44,6 +44,10 @@ editor.addQubitAtPoint = function(point) {
}
point.round();
var new_node = Math.floor(point.x) + "," + Math.floor(point.y) + "," + Math.floor(point.z);
if (Object.prototype.hasOwnProperty.call(abj.node, new_node)) {
gui.serverMessage("Node " + new_node +" already exists.");
return;
}
websocket.edit({action:"create", name:new_node, position: point});
editor.focus(new_node);
gui.serverMessage("Created node " + new_node +".");


불러오는 중...
취소
저장