graflow playing with severity in test4
This commit is contained in:
@@ -55,11 +55,32 @@
|
||||
min-width: 800px;
|
||||
min-height: 300px;
|
||||
border: 1px solid #999;
|
||||
padding: 1rem;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
border:2px solid #A00
|
||||
}
|
||||
.container::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
bottom: 3px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
pointer-events: none;
|
||||
background:
|
||||
repeating-linear-gradient(
|
||||
135deg,
|
||||
transparent 0px,
|
||||
transparent 3px,
|
||||
#A00 3px,
|
||||
#A00 6px
|
||||
);
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.addEventListener('load',()=>{
|
||||
const severities = ['primary', 'info', 'success', 'warning', 'danger', 'accent']
|
||||
|
||||
let grflw4 = document.querySelector('bz-graflow.icmp')
|
||||
grflw4.addEventListener('subflowLoaded',
|
||||
(evt) => { grflw4 = evt.detail.subflow }
|
||||
@@ -85,15 +106,28 @@
|
||||
const ro = new ResizeObserver(([entry]) => {
|
||||
const grfl = entry.target.querySelector('bz-graflow')
|
||||
grfl.autofit()
|
||||
})
|
||||
|
||||
})
|
||||
ro.observe(el)
|
||||
|
||||
let aifmi = null; let sidx=0;
|
||||
const sevanimation = () => { console.log('sevanimation')
|
||||
severities.forEach(severity => aifmi.removeAttribute(severity))
|
||||
aifmi.setAttribute(severities[sidx], '')
|
||||
sidx++
|
||||
if (sidx >= severities.length) sidx = 0
|
||||
setTimeout(sevanimation, 1000)
|
||||
}
|
||||
grflw4.addEventListener('refreshed',() => {
|
||||
aifmi = grflw4.stagedNodes['aifm-investment'].querySelector('.body')
|
||||
sevanimation()
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container" style="padding:0;"">
|
||||
<div class="container">
|
||||
<bz-graflow class="icmp" flow="./flows/testFlowICMP.json" tension="60">
|
||||
<div class="demooptions">
|
||||
<button data-trigger="onAutoplace4H">Auto-place Horizontal</button>
|
||||
|
||||
Reference in New Issue
Block a user