Skip to content

Commit

Permalink
Removed COG
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark7625 committed Mar 26, 2024
1 parent 3cf9ff5 commit e713e38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
10 changes: 9 additions & 1 deletion js/bot_api_converters/osbot/osbot_areas_converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ export class OSBotAreasConverter extends OSBotConverter {
return output;
}

toJavaSingle1(area) {
var areaDef = `AABB(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y})`;
if (area.startPosition.z > 0) {
areaDef += `.setPlane(${area.startPosition.z})`;
}
return areaDef;
}

toJavaSingle(area) {
var areaDef = `AreaName(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y})`;
if (area.startPosition.z > 0) {
Expand All @@ -65,7 +73,7 @@ export class OSBotAreasConverter extends OSBotConverter {
} else if (areas.areas.length > 1) {
var output = `AreaName(\n`;
for (var i = 0; i < areas.areas.length; i++) {
output += " " + this.toJavaSingle(areas.areas[i]);
output += " " + this.toJavaSingle1(areas.areas[i]);
if (i !== areas.areas.length - 1) {
output += ",";
}
Expand Down
11 changes: 0 additions & 11 deletions js/controls/collection_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,7 @@ export var CollectionControl = L.Control.extend({
});

// Settings control
this._createControl('<i class="fa fa-cog"></i>', container, function(e) {
if ($("#settings-panel").is(":visible")) {
$("#settings-panel").hide("slide", {direction: "right"}, 300);
} else {
if (this._currentDrawable !== undefined) {
this._toggleCollectionMode();
}

$("#settings-panel").css('display', 'flex').hide();
$("#settings-panel").show("slide", {direction: "right"}, 300);
}
});

// Area control
this._createControl('<img src="/css/images/area-icon.png" alt="Area" title="Area" height="30" width="30">', container, function(e) {
Expand Down

0 comments on commit e713e38

Please sign in to comment.