Sha256: 51e876eee239f3635a5ae2d225e1f2efcdee1b410855790720d925f564c184cb
Contents?: true
Size: 709 Bytes
Versions: 21
Compression:
Stored size: 709 Bytes
Contents
# frozen_string_literal: true module DrawioDsl module DrawioExtensionsActive def apply_active_flags sections.each do |section| section[:shapes].each do |shape| shape[:active] = check_if_active(shape) end section[:active] = section[:shapes].any? { |s| s[:active] } end end def check_if_active(shape) style = shape[:style] ban = %w[ mxCompositeShape strokeColor=none;fillColor=none shape=image shadow=1 shape=partialRectangle;right=0 shape=partialRectangle;right=0;left=0 ] return false if style.empty? return false if ban.include?(style) true end end end
Version data entries
21 entries across 21 versions & 1 rubygems