beyond-rails 0.0.254 → 0.0.259

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d0d6f0e05e67226b87ac93c97923647d70c9cc574608c8729d2c70bd1d09290
4
- data.tar.gz: 83974fc639827973d26bcfa8495c5109e8986e3d9b6c44ff720a7ffe37336da6
3
+ metadata.gz: e03fe184dcca8afa039c779b645835e3ab424f10e59719a18bfcf3ed2f8a1879
4
+ data.tar.gz: 405e4401b7199efcb2d60ff7f97c5a5944dfe728f7d13057b6a8a51dc618d09d
5
5
  SHA512:
6
- metadata.gz: b816d40ecbbf71d27698d749bce5c10438f03c27a6fb18a1178ded50b863bff5148c0a60aa032965bfb2b84f8e90a362724ab0c1d8fe169a25fad2b1939c53f1
7
- data.tar.gz: ac85421f8c566066a552bb2c16ca134ec271aee0fa8911557c13745c28173870527d035b12538c957b0cc789d13ba6e893ad44e462789e818d7f35d6b44ebf4c
6
+ metadata.gz: 38c4fcc741eaaa7cfbee14504022533b83a0ec31bd9f53b4e8c3a0be101ce422b2fbfdb51fbf2e6630014636acad13a02ccfc6c5f7bd91243e5af286923e359f
7
+ data.tar.gz: 2557d50ab4980612f5e1c95dde716a82047c3f649a492be90340b8b873a4073489c1792191da9420f1763caa97f9a29be3388a2d24b25aecfe55d426a3568346
@@ -553,6 +553,7 @@ export default class LineChart {
553
553
  if (isDef(toYLabel)) {
554
554
  mem.clear(this.toYLabel)
555
555
  }
556
+ this.pointsArr.length = 0
556
557
  this.clearPointPos()
557
558
  this.unbindMedia()
558
559
  this.removeAllLayers()
@@ -82,15 +82,23 @@ export default class TagInput {
82
82
  }
83
83
  const { elem } = tag
84
84
  const { timeout } = options
85
- const oldAttrs = rows.map(row => elem.getAttribute(row.name))
85
+
86
+ if (this.timer) {
87
+ clearTimeout(this.timer)
88
+ this.timer = null
89
+ }
90
+ else {
91
+ this.oldAttrs = rows.map(row => elem.getAttribute(row.name))
92
+ }
86
93
 
87
94
  rows.forEach(row => {
88
95
  elem.setAttribute(row.name, row.value)
89
96
  })
90
97
 
91
98
  if (timeout) {
92
- setTimeout(() => {
99
+ this.timer = setTimeout(() => {
93
100
  if (document.body.contains(elem)) {
101
+ const { oldAttrs } = this
94
102
  rows.forEach((row, i) => {
95
103
  elem.setAttribute(row.name, oldAttrs[i])
96
104
  })
@@ -138,6 +146,7 @@ export default class TagInput {
138
146
  const tag = this.getTag(inputValue, options)
139
147
  this.tags.push(tag)
140
148
  this.dom.insertBefore(tag.elem, this.inputDiv)
149
+ this.change(this.tags.slice())
141
150
  }
142
151
 
143
152
  async addTagIfNeeded() {
@@ -147,12 +156,9 @@ export default class TagInput {
147
156
  if (! res.isTag) {
148
157
  return this.shake()
149
158
  }
150
- this.addTag(inputValue, res)
151
-
152
159
  input.value = ''
153
160
  suggestInput.value = ''
154
-
155
- this.change(this.tags.slice())
161
+ this.addTag(inputValue, res)
156
162
  }
157
163
 
158
164
  removeTagIfNeeded() {
@@ -184,8 +190,11 @@ export default class TagInput {
184
190
  let lastValue = ''
185
191
 
186
192
  this.addEvent(input, 'keydown', async event => {
193
+
187
194
  const key = getKey(event)
188
195
  if ((key === 'enter') && (! this.isComposing)) {
196
+ event.preventDefault()
197
+ event.stopPropagation()
189
198
  await this.addTagIfNeeded()
190
199
  }
191
200
  else if ((key === 'backspace') && (lastValue === '')) {
@@ -170,3 +170,7 @@ input[type=file], /* FF, IE7+, chrome (except button) */
170
170
  input[type=file]::-webkit-file-upload-button { /* chromes and blink button */
171
171
  cursor: pointer;
172
172
  }
173
+
174
+ .nowrap {
175
+ white-space: nowrap !important;
176
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.254
4
+ version: 0.0.259
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmsheng
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-11-25 00:00:00.000000000 Z
12
+ date: 2020-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc