Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
update(switch): fixed switch movement speed
Browse files Browse the repository at this point in the history
Closes #4581. Closes #4816.
  • Loading branch information
EladBezalel authored and ThomasBurleson committed Oct 6, 2015
1 parent d49d8dc commit 7009c4e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/switch/demoBasicUsage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
</md-switch>

<md-switch ng-model="data.cb6" aria-label="Switch 6" ng-change="onChange(data.cb6)">
Switch 6 message: {{ message }}
Switch (onChange) state: {{ message }}
</md-switch>
</div>
4 changes: 3 additions & 1 deletion src/components/switch/demoBasicUsage/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ angular.module('switchDemo1', ['ngMaterial'])
cb5: false
};

$scope.message = 'false';

$scope.onChange = function(cbState) {
$scope.message = "The switch is now: " + cbState;
$scope.message = cbState;
};
});
2 changes: 1 addition & 1 deletion src/components/switch/switch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ md-switch {
.md-bar,
.md-thumb-container,
.md-thumb {
transition: $swift-ease-in-out;
transition: $swift-linear;
transition-property: transform, background-color;
}
.md-bar,
Expand Down
4 changes: 4 additions & 0 deletions src/core/style/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ $swift-ease-in-out-duration: 0.5s !default;
$swift-ease-in-out-timing-function: cubic-bezier(0.35, 0, 0.25, 1) !default;
$swift-ease-in-out: all $swift-ease-in-out-duration $swift-ease-in-out-timing-function !default;

$swift-linear-duration: 0.08s !default;
$swift-linear-timing-function: linear !default;
$swift-linear: all $swift-linear-duration $swift-linear-timing-function !default;

// Fab Buttons (shared between buttons.scss and fab*.scss)
// -------------------------------------------
$button-fab-width: rem(5.600) !default;
Expand Down

0 comments on commit 7009c4e

Please sign in to comment.