Changeset 9800
- Timestamp:
- 04/24/2015 05:44:46 PM (10 years ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/css/avatar-rtl.css
r9799 r9800 224 224 max-width: 100%; 225 225 width: 100%; 226 -webkit-transform: scaleX(-1); 227 transform: scaleX(-1); 226 228 } 227 229 -
trunk/src/bp-core/css/avatar.css
r9799 r9800 224 224 max-width: 100%; 225 225 width: 100%; 226 -webkit-transform: scaleX(-1); 227 transform: scaleX(-1); 226 228 } 227 229 -
trunk/src/bp-core/js/webcam.js
r9754 r9800 22 22 capture: null, 23 23 canvas: null, 24 warning: null 24 warning: null, 25 flipped: false 25 26 }; 26 27 … … 44 45 // Create the WebCam view 45 46 var cameraView = new bp.Views.WebCamAvatar( { model: new Backbone.Model( { user_media: false } ) } ); 47 48 // Make sure the flipped param is reset 49 this.params.flipped = false; 46 50 47 51 // Add it to views … … 243 247 sx = ( this.options.video.el.videoWidth - sc ) / 2; 244 248 249 // Flip only once. 250 if ( ! bp.WebCam.params.flipped ) { 251 this.options.canvas.el.getContext( '2d' ).translate( this.model.get( 'w' ), 0 ); 252 this.options.canvas.el.getContext( '2d' ).scale( -1, 1 ); 253 bp.WebCam.params.flipped = true; 254 } 255 245 256 this.options.canvas.el.getContext( '2d' ).drawImage( this.options.video.el, sx, 0, sc, sc, 0, 0, this.model.get( 'w' ), this.model.get( 'h' ) ); 246 257 bp.WebCam.params.capture = this.options.canvas.el.toDataURL( 'image/png' );
Note: See TracChangeset
for help on using the changeset viewer.