Merge pull request #121 from mayorovad/overlays-stories-fix

Fix stories with overlays usage
development
Thomas Bouffard 2022-10-10 07:14:30 +02:00 committed by GitHub
commit f08b041c3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ const Template = ({ label, ...args }) => {
if (cell != null) {
const overlays = graph.getCellOverlays(cell);
if (overlays == null) {
if (overlays.length == 0) {
// Creates a new overlay with an image and a tooltip
const overlay = new CellOverlay(
new ImageBox('/images/check.png', 16, 16),

View File

@ -61,7 +61,7 @@ const Template = ({ label, ...args }) => {
const f = () => {
const overlays = graph.getCellOverlays(v1);
if (overlays == null) {
if (overlays.length == 0) {
graph.removeCellOverlays(v2);
graph.setCellWarning(v1, 'Tooltip');
} else {