Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit f242daa

Browse files
author
Gabriel Schulhof
committed
[controlgroup] New option: "corners": boolean: default: true
1 parent c1eef14 commit f242daa

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

js/widgets/controlgroup.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ define( [ "jquery",
1414
$.widget( "mobile.controlgroup", $.mobile.widget, {
1515
options: {
1616
shadow: false,
17+
corners: true,
1718
excludeInvisible: true,
1819
type: "vertical",
1920
mini: false,
@@ -73,6 +74,12 @@ define( [ "jquery",
7374
this.refresh();
7475
},
7576

77+
_setCorners: function( value ) {
78+
this.element.toggleClass( "ui-corner-all", value );
79+
this.options.corners = value;
80+
this.refresh();
81+
},
82+
7683
_setShadow: function( value ) {
7784
this.element.toggleClass( "ui-shadow", value );
7885
},
@@ -87,7 +94,9 @@ define( [ "jquery",
8794
.not( '.ui-slider-handle' ),
8895
corners = [ true, true ];
8996

90-
if ( els.length > 1 ) {
97+
if ( !this.options.corners ) {
98+
corners = [ false, false ];
99+
} else if ( els.length > 1 ) {
91100
corners = ( this.options.type === "horizontal" ? [ "left", "right" ] : [ "top", "bottom" ] );
92101
}
93102

0 commit comments

Comments
 (0)