File tree Expand file tree Collapse file tree
skins/vector/css/matrix-react-sdk/views/rooms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,18 +18,19 @@ import React from 'react';
1818import { Draggable } from 'react-beautiful-dnd' ;
1919import RoomTile from 'matrix-react-sdk/lib/components/views/rooms/RoomTile' ;
2020
21+ import classNames from 'classnames' ;
22+
2123export default class DNDRoomTile extends React . Component {
2224 constructor ( ) {
2325 super ( ) ;
24- this . getStyle = this . getStyle . bind ( this ) ;
26+ this . getClassName = this . getClassName . bind ( this ) ;
2527 }
2628
27- getStyle ( isDragging ) {
28- const result = {
29- transform : isDragging ? "scale(1.05, 1.05)" : "none" ,
30- transition : "transform 0.2s" ,
31- } ;
32- return result ;
29+ getClassName ( isDragging ) {
30+ return classNames ( {
31+ "mx_DNDRoomTile" : true ,
32+ "mx_DNDRoomTile_dragging" : isDragging ,
33+ } ) ;
3334 }
3435
3536 render ( ) {
@@ -49,7 +50,7 @@ export default class DNDRoomTile extends React.Component {
4950 { ...provided . draggableProps }
5051 { ...provided . dragHandleProps }
5152 >
52- < div style = { this . getStyle ( snapshot . isDragging ) } >
53+ < div className = { this . getClassName ( snapshot . isDragging ) } >
5354 < RoomTile { ...props } />
5455 </ div >
5556 </ div >
Original file line number Diff line number Diff line change @@ -157,6 +157,15 @@ limitations under the License.
157157 background-color : $roomtile-selected-bg-color ;
158158}
159159
160+ .mx_DNDRoomTile {
161+ transform : none ;
162+ transition : transform 0.2s ;
163+ }
164+
165+ .mx_DNDRoomTile_dragging {
166+ transform : scale (1.05 , 1.05 );
167+ }
168+
160169.mx_RoomTile :focus {
161170 filter : none ! important;
162171 background-color : $roomtile-focused-bg-color ;
You can’t perform that action at this time.
0 commit comments