File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -262,8 +262,6 @@ GradientContainer.prototype.TYPES = {
262262 RADIAL : 2
263263} ;
264264
265- GradientContainer . prototype . angleRegExp = / ( [ + - ] ? \d * \. ? \d + ) ( d e g | g r a d | r a d | t u r n ) / ;
266-
267265function ImageContainer ( src , cors ) {
268266 this . src = src ;
269267 this . image = new Image ( ) ;
@@ -447,32 +445,6 @@ function LinearGradientContainer(imageData) {
447445 this . x1 = x0 ;
448446 this . y1 = y0 ;
449447 break ;
450- default :
451- var angle = position . match ( this . angleRegExp ) ;
452- if ( angle ) {
453- switch ( angle [ 2 ] ) {
454- case "deg" :
455- var angleDeg = parseFloat ( angle [ 1 ] ) ;
456- var radians = angleDeg / ( 180 / Math . PI ) ;
457- var slope = Math . tan ( radians ) ; // m
458-
459- var perpendicularSlope = - 1 / slope ;
460-
461-
462-
463- // y = 2
464- // y = m * x
465- // 2 = m * x
466-
467- this . y0 = 2 / Math . tan ( slope ) / 2 ; // 1
468- // console.log(radians, angle);
469- this . x0 = 0 ;
470- this . x1 = 1 ;
471- this . y1 = 0 ;
472-
473- break ;
474- }
475- }
476448 }
477449 } , this ) ;
478450 } else {
You can’t perform that action at this time.
0 commit comments