@policystudio/policy-studio-ui-vue 1.0.89 → 1.0.90
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
|
@@ -48,22 +48,29 @@ export default {
|
|
|
48
48
|
/**
|
|
49
49
|
* It sets the layout of the tooltip if needed. Usefull when using rich or dialog tooltip.
|
|
50
50
|
*/
|
|
51
|
-
layout:{
|
|
52
|
-
|
|
51
|
+
layout: {
|
|
52
|
+
type: String,
|
|
53
53
|
},
|
|
54
54
|
/**
|
|
55
55
|
* It sets a additional styling if needed.
|
|
56
56
|
*/
|
|
57
|
-
cssClass:{
|
|
58
|
-
|
|
57
|
+
cssClass: {
|
|
58
|
+
type: String,
|
|
59
59
|
},
|
|
60
60
|
/**
|
|
61
61
|
* It sets the vertical position.
|
|
62
62
|
*/
|
|
63
|
-
position:{
|
|
63
|
+
position: {
|
|
64
64
|
type: String,
|
|
65
65
|
default: 'bottom',
|
|
66
|
-
validator: (value)=> ['bottom','top'].includes(value)
|
|
66
|
+
validator: (value)=> ['bottom','top', 'custom'].includes(value)
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* It sets the custom positions.
|
|
70
|
+
*/
|
|
71
|
+
customPosition: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: '',
|
|
67
74
|
}
|
|
68
75
|
},
|
|
69
76
|
inheritAttrs: true,
|
|
@@ -120,7 +127,7 @@ export default {
|
|
|
120
127
|
dialog.style.left = `${windowWidth - rectDialog.width - 30}px`
|
|
121
128
|
} else if ((rectTrigger.x - rectDialog.width) < 0) {
|
|
122
129
|
dialog.style.left = `${rectTrigger.x + 10}px`
|
|
123
|
-
} else if (rectDialog.width >= rectTrigger.width){
|
|
130
|
+
} else if (rectDialog.width >= rectTrigger.width && this.position != 'custom') {
|
|
124
131
|
dialog.style.left = `${rectTrigger.x - ((rectDialog.width - rectTrigger.width)/2)}px`
|
|
125
132
|
} else {
|
|
126
133
|
dialog.style.left = `${rectTrigger.x + ((rectTrigger.width - rectDialog.width)/2)}px`
|
|
@@ -130,6 +137,12 @@ export default {
|
|
|
130
137
|
dialog.style.top = `${rectTrigger.y - rectDialog.height - 10}px`
|
|
131
138
|
}
|
|
132
139
|
|
|
140
|
+
if(this.position == 'custom') {
|
|
141
|
+
dialog.style = this.customPosition
|
|
142
|
+
dialog.style.display = 'block'
|
|
143
|
+
dialog.style.position = 'absolute'
|
|
144
|
+
}
|
|
145
|
+
|
|
133
146
|
setTimeout(() => {
|
|
134
147
|
dialog.style.opacity = 100
|
|
135
148
|
}, 100)
|