File tree Expand file tree Collapse file tree 3 files changed +44
-3
lines changed
AAInfographicsDemo/Demo/AdditionalContent2
AAInfographics/AAOptionsModel Expand file tree Collapse file tree 3 files changed +44
-3
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,47 @@ public class AAButtonTheme: AAObject {
181181 return self
182182 }
183183
184+ /*
185+ public func toDictionaryProp() -> [String: Any]? {
186+ var dic = [String: Any]()
187+ if let fill = fill {
188+ dic["fill"] = fill
189+ }
190+ if let stroke = stroke {
191+ dic["stroke"] = stroke
192+ }
193+ if let strokeWidth = strokeWidth {
194+ dic["stroke-width"] = strokeWidth
195+ }
196+ return dic
197+ }
198+ */
199+ public func toDictionaryProp( ) -> [ String : Any ] ? {
200+ var dic = [ String: Any] ( )
201+ if let fill = fill {
202+ dic [ " fill " ] = fill
203+ }
204+ if let padding = padding {
205+ dic [ " padding " ] = padding
206+ }
207+ if let r = r {
208+ dic [ " r " ] = r
209+ }
210+ if let states = states {
211+ dic [ " states " ] = states. toDic ( ) as Any
212+ }
213+ if let stroke = stroke {
214+ dic [ " stroke " ] = stroke
215+ }
216+ if let strokeWidth = strokeWidth {
217+ dic [ " stroke-width " ] = strokeWidth
218+ }
219+ if let style = style {
220+ dic [ " style " ] = style. toDic ( ) as Any
221+ }
222+ return dic
223+ }
224+
184225 public override init ( ) {
185226
186227 }
Original file line number Diff line number Diff line change @@ -449,7 +449,7 @@ public class AAMouseWheel: AAObject {
449449public class AAResetButton : AAObject {
450450 public var position : AAPosition ?
451451 public var relativeTo : String ?
452- public var theme : AAButtonTheme ?
452+ public var theme : [ String : Any ] ?
453453
454454 @discardableResult
455455 public func position( _ prop: AAPosition ? ) -> AAResetButton {
@@ -465,7 +465,7 @@ public class AAResetButton: AAObject {
465465
466466 @discardableResult
467467 public func theme( _ prop: AAButtonTheme ? ) -> AAResetButton {
468- theme = prop
468+ theme = prop? . toDictionaryProp ( )
469469 return self
470470 }
471471
Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ class AABaseChartVC: UIViewController {
261261 . theme ( AAButtonTheme ( )
262262 . fill ( AAColor . yellow)
263263 . stroke ( AAColor . green)
264- // .strokeWidth(6 )
264+ . strokeWidth ( 3 )
265265 . r ( 3 )
266266 . states ( AAButtonThemeStates ( )
267267 . hover ( AAButtonThemeStatesHover ( )
You can’t perform that action at this time.
0 commit comments