@textbus/platform-browser 5.0.0-alpha.16 → 5.0.0-alpha.17

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.
@@ -50,7 +50,7 @@ function getLayoutRectByRange(range) {
50
50
  return {
51
51
  left: rect.right,
52
52
  top: rect.top,
53
- width: range.collapsed ? 0 : rect.width,
53
+ width: range.collapsed ? 1 : rect.width,
54
54
  height: rect.height
55
55
  };
56
56
  }
@@ -62,7 +62,7 @@ function getLayoutRectByRange(range) {
62
62
  return {
63
63
  left: rect.right,
64
64
  top: rect.top,
65
- width: range.collapsed ? 0 : rect.width,
65
+ width: range.collapsed ? 1 : rect.width,
66
66
  height: rect.height
67
67
  };
68
68
  }
@@ -76,7 +76,7 @@ function getLayoutRectByRange(range) {
76
76
  return {
77
77
  left: rect.right,
78
78
  top: rect.top,
79
- width: range.collapsed ? 0 : rect.width,
79
+ width: range.collapsed ? 1 : rect.width,
80
80
  height: rect.height
81
81
  };
82
82
  }
@@ -87,7 +87,7 @@ function getLayoutRectByRange(range) {
87
87
  return {
88
88
  left: rect.left,
89
89
  top: rect.top,
90
- width: range.collapsed ? 0 : rect.width,
90
+ width: range.collapsed ? 1 : rect.width,
91
91
  height: rect.height
92
92
  };
93
93
  }
@@ -107,7 +107,7 @@ function getLayoutRectByRange(range) {
107
107
  return {
108
108
  left: rect.left,
109
109
  top: rect.top,
110
- width: range.collapsed ? 0 : rect.width,
110
+ width: range.collapsed ? 1 : rect.width,
111
111
  height: rect.height
112
112
  };
113
113
  }
@@ -1332,7 +1332,7 @@ class ExperimentalCaret {
1332
1332
  hackEle.remove();
1333
1333
  }
1334
1334
  }
1335
- if (rotate === 0 && (writingMode === 'vertical-lr' || writingMode === 'vertical-rl')) {
1335
+ if (writingMode === 'vertical-lr' || writingMode === 'vertical-rl') {
1336
1336
  rotate += 90;
1337
1337
  }
1338
1338
  Object.assign(this.elementRef.style, {
package/bundles/index.js CHANGED
@@ -52,7 +52,7 @@ function getLayoutRectByRange(range) {
52
52
  return {
53
53
  left: rect.right,
54
54
  top: rect.top,
55
- width: range.collapsed ? 0 : rect.width,
55
+ width: range.collapsed ? 1 : rect.width,
56
56
  height: rect.height
57
57
  };
58
58
  }
@@ -64,7 +64,7 @@ function getLayoutRectByRange(range) {
64
64
  return {
65
65
  left: rect.right,
66
66
  top: rect.top,
67
- width: range.collapsed ? 0 : rect.width,
67
+ width: range.collapsed ? 1 : rect.width,
68
68
  height: rect.height
69
69
  };
70
70
  }
@@ -78,7 +78,7 @@ function getLayoutRectByRange(range) {
78
78
  return {
79
79
  left: rect.right,
80
80
  top: rect.top,
81
- width: range.collapsed ? 0 : rect.width,
81
+ width: range.collapsed ? 1 : rect.width,
82
82
  height: rect.height
83
83
  };
84
84
  }
@@ -89,7 +89,7 @@ function getLayoutRectByRange(range) {
89
89
  return {
90
90
  left: rect.left,
91
91
  top: rect.top,
92
- width: range.collapsed ? 0 : rect.width,
92
+ width: range.collapsed ? 1 : rect.width,
93
93
  height: rect.height
94
94
  };
95
95
  }
@@ -109,7 +109,7 @@ function getLayoutRectByRange(range) {
109
109
  return {
110
110
  left: rect.left,
111
111
  top: rect.top,
112
- width: range.collapsed ? 0 : rect.width,
112
+ width: range.collapsed ? 1 : rect.width,
113
113
  height: rect.height
114
114
  };
115
115
  }
@@ -1334,7 +1334,7 @@ class ExperimentalCaret {
1334
1334
  hackEle.remove();
1335
1335
  }
1336
1336
  }
1337
- if (rotate === 0 && (writingMode === 'vertical-lr' || writingMode === 'vertical-rl')) {
1337
+ if (writingMode === 'vertical-lr' || writingMode === 'vertical-rl') {
1338
1338
  rotate += 90;
1339
1339
  }
1340
1340
  Object.assign(this.elementRef.style, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/platform-browser",
3
- "version": "5.0.0-alpha.16",
3
+ "version": "5.0.0-alpha.17",
4
4
  "description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -47,5 +47,5 @@
47
47
  "bugs": {
48
48
  "url": "https://github.com/textbus/textbus.git/issues"
49
49
  },
50
- "gitHead": "8c9e90bd1a3effc96dcbbd455f24a8b263087e90"
50
+ "gitHead": "18b9c97853ebde681d91d6be1b3cf0b78de2dcc8"
51
51
  }