Skip to content

Commit

Permalink
Update morphic.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoenig committed Jan 22, 2024
1 parent eb4c498 commit 59ff5d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/morphic.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
written by Jens Mönig
[email protected]
Copyright (C) 2010-2023 by Jens Mönig
Copyright (C) 2010-2024 by Jens Mönig
This file is part of Snap!.
Expand Down Expand Up @@ -1306,7 +1306,7 @@

/*jshint esversion: 11, bitwise: false*/

var morphicVersion = '2023-November-07';
var morphicVersion = '2024-January-22';
var modules = {}; // keep track of additional loaded modules
var useBlurredShadows = true;

Expand Down Expand Up @@ -2130,8 +2130,8 @@ Color.prototype.toRGBstring = function () {

Color.fromString = function (aString) {
// I parse rgb/rgba strings into a Color object
var components = aString.split(/[\(),]/).slice(1,5);
return new Color(components[0], components[1], components[2], components[3]);
var channels = aString.split(/[\(),]/).slice(0,4);
return new Color(+channels[0], +channels[1], +channels[2], +channels[3]);
};

// Color copying:
Expand Down

0 comments on commit 59ff5d6

Please sign in to comment.