|
@@ -69,20 +69,6 @@ export default {
|
|
|
|
|
|
return 'unknown';
|
|
|
},
|
|
|
- style: function () {
|
|
|
- let color = this.color();
|
|
|
-
|
|
|
- return {
|
|
|
- backgroundColor: `rgba(${color}, ${this.shine ? 0.6 : 0.3})`,
|
|
|
- borderColor: `rgba(${color}, ${this.shine ? 0.8 : 0.4})`,
|
|
|
- top: this.position.y * 100 + '%',
|
|
|
- left: this.position.x * 100 + '%',
|
|
|
- width: this.position.w * 100 + '%',
|
|
|
- height: this.position.h * 100 + '%'
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- methods: {
|
|
|
|
|
|
color: function() {
|
|
|
let box = this.box;
|
|
@@ -107,8 +93,33 @@ export default {
|
|
|
|
|
|
case 'pipeline':
|
|
|
return this.colors.pipeline;
|
|
|
+
|
|
|
+ default:
|
|
|
+ return this.colors.default;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ alpha: function () {
|
|
|
+ return this.shine ? 0.6 : 0.3;
|
|
|
+ },
|
|
|
+
|
|
|
+ style: function () {
|
|
|
+ let color = this.color;
|
|
|
+ let alpha = this.alpha;
|
|
|
+
|
|
|
+ return {
|
|
|
+ backgroundColor: `rgba(${color}, ${alpha})`,
|
|
|
+ borderColor: `rgba(${color}, ${Math.min(1, alpha * 1.5)})`,
|
|
|
+ top: this.position.y * 100 + '%',
|
|
|
+ left: this.position.x * 100 + '%',
|
|
|
+ width: this.position.w * 100 + '%',
|
|
|
+ height: this.position.h * 100 + '%'
|
|
|
}
|
|
|
},
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+
|
|
|
|
|
|
doubleLeftClick(event) {
|
|
|
console.debug("double left click", event);
|