File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ Dashing.params = Batman.URI.paramsFromQuery(window.location.search.slice(1));
3434class Dashing.Widget extends Batman.View
3535 constructor : ->
3636 # Set the view path
37- @constructor :: source = Batman .Filters .underscore (@constructor . name )
37+ @constructor :: source = Batman .Filters .underscore (getName () )
3838 super
3939
4040 @ mixin ($ (@node ).data ())
@@ -62,6 +62,11 @@ class Dashing.Widget extends Batman.View
6262 onData : (data ) =>
6363 # Widgets override this to handle incoming data
6464
65+ getName : () =>
66+ funcNameRegex = / function ([^ \( ] {1,} )\( / ;
67+ results = (funcNameRegex).exec (@constructor .toString ())
68+ if (results && results .length > 1 ) then results[1 ].trim () else " "
69+
6570Dashing .AnimatedValue =
6671 get : Batman .Property .defaultAccessor .get
6772 set : (k , to ) ->
You can’t perform that action at this time.
0 commit comments