Skip to content

Commit 834223b

Browse files
Impliment Sizing
1 parent afafbd7 commit 834223b

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

demo/app/app.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ button {
1616
}
1717

1818
.fab-button {
19-
height: 50;
20-
width: 50;
19+
height: 75;
20+
width: 75;
2121
margin: 15;
2222
horizontal-align: right;
23-
vertical-align: bottom;
23+
vertical-align: top;
2424
color: #FFF;
2525
background-color: #ff4081;
2626
}

fab.ios.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,26 @@ var FloatingActionButtonStyler = (function () {
7070
return fab.buttonColor;
7171
};
7272

73+
// WIDTH\HEIGHT
74+
FloatingActionButtonStyler.setSizeProperty = function (view, newValue) {
75+
var fab = view.ios;
76+
fab.size = newValue;
77+
};
78+
FloatingActionButtonStyler.resetSizeProperty = function (view, nativeValue) {
79+
var fab = view.ios;
80+
fab.size = nativeValue;
81+
};
82+
FloatingActionButtonStyler.getNativeSizeValue = function (view) {
83+
var fab = view.ios;
84+
return fab.size;
85+
};
86+
7387
FloatingActionButtonStyler.registerHandlers = function () {
7488
style.registerHandler(style.colorProperty, new style.StylePropertyChangedHandler(FloatingActionButtonStyler.setColorProperty, FloatingActionButtonStyler.resetColorProperty, FloatingActionButtonStyler.getNativeColorValue), "FloatingActionButton");
7589
style.registerHandler(style.backgroundColorProperty, new style.StylePropertyChangedHandler(FloatingActionButtonStyler.setBackgroundColorProperty, FloatingActionButtonStyler.resetBackgroundColorProperty, FloatingActionButtonStyler.getNativeBackgroundColorValue), "FloatingActionButton");
90+
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "FloatingActionButton");
91+
style.registerHandler(style.widthProperty, new style.StylePropertyChangedHandler(FloatingActionButtonStyler.setSizeProperty, FloatingActionButtonStyler.resetSizeProperty, FloatingActionButtonStyler.getNativeSizeValue), "FloatingActionButton");
92+
style.registerHandler(style.heightProperty, new style.StylePropertyChangedHandler(FloatingActionButtonStyler.setSizeProperty, FloatingActionButtonStyler.resetSizeProperty, FloatingActionButtonStyler.getNativeSizeValue), "FloatingActionButton");
7693
};
7794
return FloatingActionButtonStyler;
7895
})();

0 commit comments

Comments
 (0)