@mixd-id/web-scaffold 0.1.230406208 → 0.1.230406210

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406208",
4
+ "version": "0.1.230406210",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -51,11 +51,6 @@ export default{
51
51
  default: false
52
52
  },
53
53
 
54
- gap: {
55
- type: Array,
56
- default: [ '0' ]
57
- },
58
-
59
54
  ratio: Array,
60
55
 
61
56
  autoPlay: [ Number, String ],
@@ -84,15 +79,6 @@ export default{
84
79
  ]
85
80
  .filter(_ => _)
86
81
  .join(' ')
87
- },
88
-
89
- gaps(){
90
- if(!this.gap) return []
91
-
92
- return [
93
- this.gap[0] ? this.gap[0] : '',
94
- this.gap[1] ? this.gap[1] : (this.gap[0] ? this.gap[0] : '')
95
- ]
96
82
  }
97
83
 
98
84
  },
@@ -150,18 +136,13 @@ export default{
150
136
  left += item.clientWidth
151
137
  }
152
138
 
153
- const paddingRight = parseInt(window.getComputedStyle(this.$refs.inner)['padding-right'])
154
- if(index === this.$refs.inner.children.length - 1){
155
- left -= paddingRight
156
- }
157
- else if(index === 0){
158
- }
159
- else{
160
- left -= Math.round(paddingRight / 2)
161
- }
139
+ const gapPx = parseInt(window.getComputedStyle(this.$refs.inner).getPropertyValue('column-gap'))
140
+ left += gapPx
162
141
 
163
142
  left *= -1
164
143
 
144
+ console.log('left', left)
145
+
165
146
  if(!noAnimation){
166
147
  this.$el.firstElementChild.addEventListener('transitionend', function(){
167
148
  this.classList.remove('transition-carousel')
@@ -218,13 +199,13 @@ export default{
218
199
  const dy = sy - this._props['sy']
219
200
 
220
201
  if(!this._props['direction']){
221
- if(Math.abs(dy) > 3){
222
- this._props['direction'] = 'vertical'
223
- }
224
- else if(Math.abs(dx) > 3){
202
+ if(Math.abs(dx) > 3){
225
203
  this._props['direction'] = 'horizontal'
226
204
  this.swiping = true
227
205
  }
206
+ else if(Math.abs(dy) > 3){
207
+ this._props['direction'] = 'vertical'
208
+ }
228
209
  }
229
210
  else if(this._props['direction'] === 'horizontal'){
230
211
  let ix
@@ -352,10 +333,6 @@ export default{
352
333
  vertical-align: top;
353
334
  }
354
335
 
355
- .item{
356
- padding-right: v-bind(gaps[0])
357
- }
358
-
359
336
  .legend{
360
337
  @apply flex justify-center gap-2 py-1;
361
338
  }