Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Raphael to work in pages with a Content Security Policy that disallows 'unsafe-eval'. #770

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions dev/raphael.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
| var c = paper.circle(10, 10, 10).attr({hue: .45});
| // or even like this:
| c.animate({hue: 1}, 1e3);
|
|
| // You could also create custom attribute
| // with multiple parameters:
| paper.customAttributes.hsb = function (h, s, b) {
Expand Down Expand Up @@ -417,7 +417,13 @@
if (Object(obj) !== obj) {
return obj;
}
var res = new obj.constructor;
var res;
if (!obj.join) {
res = function(){};
}
else {
res = new obj.constructor;
}
for (var key in obj) if (obj[has](key)) {
res[key] = clone(obj[key]);
}
Expand Down Expand Up @@ -3076,7 +3082,7 @@
[ method ]
**
* Adds or retrieves given value asociated with given key.
**
**
* See also @Element.removeData
> Parameters
- key (string) key to store data
Expand Down Expand Up @@ -3184,8 +3190,8 @@
- mcontext (object) #optional context for moving handler
- scontext (object) #optional context for drag start handler
- econtext (object) #optional context for drag end handler
* Additionaly following `drag` events will be triggered: `drag.start.<id>` on start,
* `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element
* Additionaly following `drag` events will be triggered: `drag.start.<id>` on start,
* `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element
* `drag.over.<id>` will be fired as well.
*
* Start event and start handler will be called in specified context or in context of the element with following parameters:
Expand Down Expand Up @@ -3487,7 +3493,7 @@
* Paper.setViewBox
[ method ]
**
* Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by
* Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by
* specifying new boundaries.
**
> Parameters
Expand Down Expand Up @@ -3960,7 +3966,7 @@
elproto.getPath = function () {
var path,
getPath = R._getPath[this.type];

if (this.type == "text" || this.type == "set") {
return;
}
Expand Down Expand Up @@ -4246,8 +4252,8 @@
}
}
return element;
//
//
//
//
// var a = params ? R.animation(params, ms, easing, callback) : anim,
// status = element.status(anim);
// return this.animate(a).status(a, status * anim.ms / a.ms);
Expand Down