Skip to content

Commit 069a03e

Browse files
committed
rework development
1 parent 851f59b commit 069a03e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+464
-396
lines changed

.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"extends": "seregpie"}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/node_modules/
1+
/node_modules

.npmignore

-4
This file was deleted.

VueWordCloud.js

-1
This file was deleted.

demo/script.js

+18-19
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
(function() {
22

33
var svgNS = 'http://www.w3.org/2000/svg';
4-
54
new Vue({
65
el: '#app',
7-
6+
vuetify: new Vuetify(),
87
data: function() {
98
return {
109
animation: undefined,
@@ -213,44 +212,49 @@
213212
wordsText: undefined,
214213
};
215214
},
216-
217215
computed: {
218216
animationDuration: function() {
219217
return this.animationDurationValues[this.animationDurationValueIndex];
220218
},
221-
222219
animationOverlap: function() {
223220
return this.animationOverlapValues[this.animationOverlapValueIndex];
224221
},
225-
226222
color: function() {
227223
var colors = this.colorItems[this.colorItemIndex];
228224
return function() {
229225
return chance.pickone(colors);
230226
};
231227
},
232-
233228
enterAnimation: function() {
234-
return ['animated', this.animation[0]].join(' ');
229+
return [
230+
'animated',
231+
this.animation[0],
232+
]
233+
.map(function(value) {
234+
return 'animate__' + value;
235+
})
236+
.join(' ');
235237
},
236-
237238
fontSizeRatio: function() {
238239
return this.fontSizeRatioValues[this.fontSizeRatioValueIndex];
239240
},
240-
241241
leaveAnimation: function() {
242-
return ['animated', this.animation[1]].join(' ');
242+
return [
243+
'animated',
244+
this.animation[1],
245+
]
246+
.map(function(value) {
247+
return 'animate__' + value;
248+
})
249+
.join(' ');
243250
},
244-
245251
rotation: function() {
246252
var item = this.rotationItems[this.rotationItemIndex];
247253
return item.value;
248254
},
249-
250255
spacing: function() {
251256
return this.spacingValues[this.spacingValueIndex];
252257
},
253-
254258
words: function() {
255259
return this.wordsText
256260
.split(/[\r\n]+/)
@@ -262,20 +266,18 @@
262266
})
263267
.map(function(matched) {
264268
var text = matched[1];
265-
var weight = Number.parseInt(matched[2]);
269+
var weight = Number(matched[2]);
266270
return [text, weight];
267271
});
268272
},
269273
},
270-
271274
watch: {
272275
progress: function(currentProgress, previousProgress) {
273276
if (previousProgress) {
274277
this.progressVisible = false;
275278
}
276279
},
277280
},
278-
279281
created: function() {
280282
this.generateWordsText();
281283
this.animation = chance.pickone(this.animationItems).value;
@@ -284,7 +286,6 @@
284286
this.fontFamily = chance.pickone(this.fontFamilyValues);
285287
this.rotationItemIndex = chance.integer({min: 0, max: this.rotationItems.length - 1});
286288
},
287-
288289
methods: {
289290
generateWordsText: function() {
290291
this.wordsText = [
@@ -306,11 +307,9 @@
306307
}, [])
307308
.join('\n');
308309
},
309-
310310
loadFont: function(fontFamily, fontStyle, fontWeight, text) {
311311
return (new FontFaceObserver(fontFamily, {style: fontStyle, weight: fontWeight})).load(text);
312312
},
313-
314313
onWordClick: function(word) {
315314
this.snackbarVisible = true;
316315
this.snackbarText = word[0];

0 commit comments

Comments
 (0)