@netless/telebox-insider 0.2.24 → 0.2.27

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": "@netless/telebox-insider",
3
- "version": "0.2.24",
3
+ "version": "0.2.27",
4
4
  "private": false,
5
5
  "description": "Window widget for Whiteboard",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  "storybook": "start-storybook -p 6006 --no-version-updates",
25
25
  "build-storybook": "build-storybook && node scripts/move-storybook.js",
26
26
  "deploy-storybook": "yarn run build-storybook && node scripts/deploy-storybook.js",
27
- "cleanup": "rimraf ./build"
27
+ "cleanup": "rimraf ./dist"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@babel/plugin-proposal-class-properties": "^7.13.0",
@@ -888,8 +888,12 @@ export class TeleBox {
888
888
  const absoluteWidth = size.width * containerRect.width;
889
889
  const absoluteHeight = size.height * containerRect.height;
890
890
  return {
891
- width: absoluteWidth,
892
- height: absoluteHeight,
891
+ width:
892
+ absoluteWidth +
893
+ (minimized && collectorRect ? 1 : 0),
894
+ height:
895
+ absoluteHeight +
896
+ (minimized && collectorRect ? 1 : 0),
893
897
  x: coord.x * containerRect.width,
894
898
  y: coord.y * containerRect.height,
895
899
  scaleX:
@@ -1,4 +1,5 @@
1
1
  @import "../scss/variables.scss";
2
+ @import "../scss/mixins.scss";
2
3
 
3
4
  .#{$namespace}-box {
4
5
  position: absolute;
@@ -57,6 +58,8 @@
57
58
  }
58
59
 
59
60
  .#{$namespace}-resize-handle {
61
+ @include no-user-select;
62
+
60
63
  position: absolute;
61
64
  z-index: 2147483647;
62
65
  }
@@ -126,6 +129,8 @@
126
129
  }
127
130
 
128
131
  .#{$namespace}-track-mask {
132
+ @include no-user-select;
133
+
129
134
  position: fixed;
130
135
  top: 0;
131
136
  left: 0;
@@ -1,6 +1,9 @@
1
1
  @import "../scss/variables.scss";
2
+ @import "../scss/mixins.scss";
2
3
 
3
4
  .#{$namespace}-collector {
5
+ @include no-user-select;
6
+
4
7
  visibility: hidden;
5
8
  display: block;
6
9
  position: absolute;
@@ -1,4 +1,5 @@
1
1
  @import "../../scss/variables.scss";
2
+ @import "../../scss/mixins.scss";
2
3
 
3
4
  $scrollbar-size: 8px;
4
5
  $scrollbar-ff-width: auto; // FF-only accepts auto, thin, none
@@ -9,12 +10,13 @@ $scrollbar-color-hover: rgba(238, 238, 247, 1);
9
10
  $scrollbar-color-active: rgba(238, 238, 247, 1);
10
11
 
11
12
  .#{$namespace}-max-titlebar {
13
+ @include no-user-select;
14
+
12
15
  display: none;
13
16
  position: absolute;
14
17
  top: 0;
15
18
  left: 0;
16
19
  z-index: $base-z-index * 500;
17
- user-select: none;
18
20
 
19
21
  .#{$namespace}-title {
20
22
  display: none;
@@ -1,6 +1,9 @@
1
1
  @import "../../scss/variables.scss";
2
+ @import "../../scss/mixins.scss";
2
3
 
3
4
  .#{$namespace}-titlebar {
5
+ @include no-user-select;
6
+
4
7
  box-sizing: border-box;
5
8
  height: 26px;
6
9
  display: flex;
@@ -22,6 +25,8 @@
22
25
  }
23
26
 
24
27
  .#{$namespace}-title {
28
+ @include no-user-select;
29
+
25
30
  overflow: hidden;
26
31
  margin: 0;
27
32
  padding: 0;
@@ -53,6 +58,8 @@
53
58
  }
54
59
 
55
60
  .#{$namespace}-titlebar-btn {
61
+ @include no-user-select;
62
+
56
63
  width: 22px;
57
64
  height: 22px;
58
65
  padding: 0;
@@ -0,0 +1,7 @@
1
+ @mixin no-user-select {
2
+ user-select: none;
3
+ // touch device
4
+ -webkit-touch-callout: none;
5
+ // iOS Safari
6
+ -webkit-user-select: none;
7
+ }