123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /**
- * Created by zhengguorong on 2016/11/21.
- * Modify by liuhaixiao on 2018/07/11
- */
- export default class Element {
- constructor(ele = {}) {
- this.type = ele.type || 'pic'
- this.imgSrc = ele.imgSrc || ''
- this.left = ele.left || 0
- this.top = ele.top || 0
- this.width = ele.width || 0
- this.height = ele.height || 0
- this.lineHeight = ele.lineHeight || 0
- this.animatedName = ele.animatedName || ''
- this.animatedType = ele.animatedType || 0
- this.duration = ele.duration || 1
- this.delay = ele.delay || 0
- this.playing = false
- this.loop = false
- this.opacity = ele.opacity || 100
- this.transform = ele.transform || 0
- this.text = ele.text || ''
- this.textAlign = ele.textAlign || 'left'
- this.verticalAlign = ele.verticalAlign || 'top'
- this.display = ele.display || 'block'
- this.iconKey = ele.iconKey || ''
- this.bg = ele.bg || ''
- this.fontSize = ele.fontSize || 24
- this.fontFamily = ele.fontFamily || '默认字体'
- this.fontWeight = ele.fontWeight || 'normal'
- this.color = ele.color || '#000000'
- this.selectedColor = ele.selectedColor || '#000000'
- this.zindex = ele.zindex || 1
- this.backgroundColor = ele.backgroundColor || ''
- this.imgSrcMore = ele.imgSrcMore || Array
- this.border = ele.border || ''
- this.border = ele.border || ''
- this.morePic = ele.morePic || []
- this.children = ele.children || []
- this.textIndent = ele.textIndent || ''
- this.letterSpacing = ele.letterSpacing || ''
- this.allTransparent = ele.allTransparent
- this.audioSrc = ele.audioSrc || ''
- this.nodeId = ele.nodeId || ''
- this.elabEditable = ele.elabEditable || true
- this.locked = ele.locked || false
- this.des = ele.des || this.type
- this.verticalFont = ele.verticalFont || ''
- this.shadowColor = ele.shadowColor || ''
- this.shadowX = ele.shadowX || 0
- this.shadowY = ele.shadowY || 0
- this.shadowVague = ele.shadowVague || 0
- this.circular = ele.circular || 0
- this.videoEditable = ele.videoEditable || false
- this.animatedEnabled = ele.animatedEnabled || true
- this.animatedFont = ele.animatedFont || ''
- this.eleCanvas = ele.eleCanvas || ''
- this.swiperType = ele.swiperType || 'mtswiper'
- this.fixed = ele.fixed || false
- this.backgroundSelectedImg = ele.backgroundSelectedImg || ''
- this.backgroundUnselectedImg = ele.backgroundUnselectedImg || ''
- this.questionId = ele.questionId || 0
- this.optionId = ele.optionId || 0
- this.href = ele.href ||''
- }
- }
|