|
@@ -211,3 +211,61 @@ function registerEvent() {
|
|
if ($(this).hasClass('active')) {
|
|
if ($(this).hasClass('active')) {
|
|
$(this).removeClass('active');
|
|
$(this).removeClass('active');
|
|
$(this).children('.control-menu').removeClass('actives');
|
|
$(this).children('.control-menu').removeClass('actives');
|
|
|
|
+ $(this).find('.tooltiptext').css({ "visibility": "visible" });
|
|
|
|
+ } else {
|
|
|
|
+ $(this).addClass('active');
|
|
|
|
+ $(this).children('.control-menu').addClass('actives');
|
|
|
|
+ $(this).find('.tooltiptext').css({ "visibility": "hidden" });
|
|
|
|
+ }
|
|
|
|
+ }).hover(function () {
|
|
|
|
+ if (!$(this).hasClass('active')) {
|
|
|
|
+ $(this).find('.tooltiptext').css({ "visibility": "visible" });
|
|
|
|
+ }
|
|
|
|
+ }, function () {
|
|
|
|
+ $(this).find('.tooltiptext').css({ "visibility": "hidden" });
|
|
|
|
+ });
|
|
|
|
+ // 进入层级事件
|
|
|
|
+ app.on(THING.EventType.EnterLevel, function (ev) {
|
|
|
|
+ stopRotate();
|
|
|
|
+ // 进入建筑层级
|
|
|
|
+ if (ev.object.type == 'Building') {
|
|
|
|
+ //清除设备列表和面板
|
|
|
|
+ _this.delMydiv();
|
|
|
|
+ _this.destroy_ui();
|
|
|
|
+ let floors = ev.object.floors;
|
|
|
|
+ if (floors.length > 1) {
|
|
|
|
+ building = ev.object;
|
|
|
|
+ addFloorPos(building);
|
|
|
|
+ let expandState = building.getAttribute('expandState');
|
|
|
|
+ if (expandState == null) {
|
|
|
|
+ building.setAttribute('expandState', 'close');
|
|
|
|
+ }
|
|
|
|
+ $('#horizontalExpansion').css({ 'display': 'block' });
|
|
|
|
+ $('#verticalExpansion').css({ 'display': 'block' });
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $('#horizontalExpansion').css({ 'display': 'none' });
|
|
|
|
+ $('#verticalExpansion').css({ 'display': 'none' });
|
|
|
|
+ // 进入园区层级
|
|
|
|
+ if (ev.object.type == 'Campus') {
|
|
|
|
+ if (building != null) {
|
|
|
|
+ exitBuildingCloseFloor(building);
|
|
|
|
+ $('#horizontalExpansion').removeClass('active');
|
|
|
|
+ $('#verticalExpansion').removeClass('active');
|
|
|
|
+ building = null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (skyBox != null) {
|
|
|
|
+ app.skyBox = skyBox;
|
|
|
|
+ }
|
|
|
|
+ // 重新创建小地图
|
|
|
|
+ if ($('#miniMap').hasClass('active')) {
|
|
|
|
+ destoryMiniMap();
|
|
|
|
+ createMiniMap();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ // 行走按钮的鼠标点击事件
|
|
|
|
+ $('#moveByFps').on('click', function () {
|
|
|
|
+ stopRotate();
|
|
|
|
+ if ($(this).hasClass('active')) {
|