@abi-software/scaffoldvuer 0.1.52-beta.3 → 0.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/scaffoldvuer",
3
- "version": "0.1.52-beta.3",
3
+ "version": "0.1.52",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,9 +22,9 @@
22
22
  "*.js"
23
23
  ],
24
24
  "dependencies": {
25
- "@abi-software/svg-sprite": "^0.1.14",
25
+ "@abi-software/svg-sprite": "^0.1.15",
26
26
  "axios": "^0.21.2",
27
- "core-js": "^3.3.2",
27
+ "core-js": "^3.22.5",
28
28
  "current-script-polyfill": "^1.0.0",
29
29
  "element-ui": "^2.13.0",
30
30
  "google-spreadsheet": "^3.1.15",
@@ -33,7 +33,7 @@
33
33
  "vue": "^2.6.10",
34
34
  "vue-drag-resize": "^1.3.2",
35
35
  "vue-router": "^3.5.1",
36
- "zincjs": "^1.0.0-alpha-3"
36
+ "zincjs": "^1.0.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@vue/cli-plugin-babel": "^4.0.0",
@@ -102,6 +102,15 @@ export default {
102
102
  }
103
103
  }
104
104
  }
105
+
106
+ &.el-popper[x-placement^="bottom"] {
107
+ .popper__arrow {
108
+ border-bottom-color: $app-primary-color !important;
109
+ &:after {
110
+ border-bottom-color: #fff !important;
111
+ }
112
+ }
113
+ }
105
114
  }
106
115
 
107
116
  .tooltipContainer {
@@ -672,21 +672,28 @@ export default {
672
672
  cameracontrol.stopAutoTumble();
673
673
  this.isTransitioning = false;
674
674
  },
675
+ findObjectsWithGroupName: function(name) {
676
+ let objects = [];
677
+ if (name && name != "" && this.$module.scene) {
678
+ objects = this.$module.scene.findObjectsWithGroupName(name);
679
+ }
680
+ return objects;
681
+ },
675
682
  /**
676
683
  * Focus on named region
677
684
  */
678
685
  viewRegion: function(name) {
679
- if (name && name != "" && this.$module.scene) {
680
- let objects = this.$module.scene.findObjectsWithGroupName(name);
681
- let box = this.$module.scene.getBoundingBoxOfZincObjects(objects);
682
- if (box) {
683
- if (this.$module.isSyncControl()) {
684
- this.$module.setSyncControlZoomToBox(box);
685
- } else {
686
- this.$module.scene.viewAllWithBoundingBox(box);
687
- }
686
+ let objects = this.findObjectsWithGroupName(name);
687
+ let box = this.$module.scene.getBoundingBoxOfZincObjects(objects);
688
+ if (box) {
689
+ if (this.$module.isSyncControl()) {
690
+ this.$module.setSyncControlZoomToBox(box);
691
+ } else {
692
+ this.$module.scene.viewAllWithBoundingBox(box);
688
693
  }
694
+ return true;
689
695
  }
696
+ return false;
690
697
  },
691
698
  setFocusedRegion: function(name) {
692
699
  if (name) {
@@ -753,6 +760,7 @@ export default {
753
760
  this.$emit("scaffold-selected", event.identifiers);
754
761
  } else if (event.eventType == 2) {
755
762
  this.tData.visible = false;
763
+ const offsets = this.$refs.scaffoldContainer.getBoundingClientRect();
756
764
  if (event.identifiers[0]) {
757
765
  let id = event.identifiers[0].data.id
758
766
  ? event.identifiers[0].data.id
@@ -760,8 +768,8 @@ export default {
760
768
  if (event.identifiers[0].coords) {
761
769
  this.tData.visible = true;
762
770
  this.tData.label = id;
763
- this.tData.x = event.identifiers[0].coords.x;
764
- this.tData.y =event.identifiers[0].coords.y;
771
+ this.tData.x = event.identifiers[0].coords.x - offsets.left;
772
+ this.tData.y = event.identifiers[0].coords.y - offsets.top;
765
773
  }
766
774
  if (this.$refs.treeControl) {
767
775
  let region = event.identifiers[0].data.region;
@@ -775,8 +783,9 @@ export default {
775
783
  } else if (event.eventType == 3) { //MOVE
776
784
  if (event.identifiers[0]) {
777
785
  if (event.identifiers[0].coords) {
778
- this.tData.x = event.identifiers[0].coords.x;
779
- this.tData.y = event.identifiers[0].coords.y;
786
+ const offsets = this.$refs.scaffoldContainer.getBoundingClientRect();
787
+ this.tData.x = event.identifiers[0].coords.x - offsets.left;
788
+ this.tData.y = event.identifiers[0].coords.y - offsets.top;
780
789
  }
781
790
  }
782
791
  }
@@ -47,7 +47,8 @@ RendererModule.prototype.getIntersectedObject = function(intersects) {
47
47
  if (intersects[i].object &&
48
48
  intersects[i].object.userData &&
49
49
  intersects[i].object.userData.isZincObject &&
50
- (intersects[i].object.name ||
50
+ ((intersects[i].object.name &&
51
+ intersects[i].object.name !== "_Unnamed") ||
51
52
  intersects[i].object.userData.isMarker))
52
53
  return intersects[i];
53
54
  }
package/vue.config.js CHANGED
@@ -3,7 +3,7 @@ const nodeExternals = require('webpack-node-externals');
3
3
  module.exports = {
4
4
  configureWebpack: config => {
5
5
  if(process.env.NODE_ENV === 'production') {
6
- config.externals = [ nodeExternals() ];
6
+ config.externals = [ nodeExternals({allowlist: [/^element-ui/]}) ];
7
7
  }
8
8
  },
9
9
  chainWebpack: config => {