1
|
=== modified file 'src/com/goldencode/p2j/ui/client/chui/driver/web/res/p2j.clipboard_helpers.js'
|
2
|
--- src/com/goldencode/p2j/ui/client/chui/driver/web/res/p2j.clipboard_helpers.js 2015-08-11 12:06:47 +0000
|
3
|
+++ src/com/goldencode/p2j/ui/client/chui/driver/web/res/p2j.clipboard_helpers.js 2015-08-11 14:09:12 +0000
|
4
|
@@ -75,7 +75,7 @@
|
5
|
contextmenu : "menu-id",
|
6
|
width : p2j.screen.canvasWidth,
|
7
|
height : p2j.screen.canvasHeight,
|
8
|
- style : { zIndex : 1, position : "absolute" }
|
9
|
+ style : { zIndex : 1, position : "absolute"}
|
10
|
};
|
11
|
|
12
|
canvas = p2j.createCanvas(null, settings);
|
13
|
|
14
|
=== modified file 'src/com/goldencode/p2j/ui/client/driver/web/res/p2j.js'
|
15
|
--- src/com/goldencode/p2j/ui/client/driver/web/res/p2j.js 2015-08-08 13:14:02 +0000
|
16
|
+++ src/com/goldencode/p2j/ui/client/driver/web/res/p2j.js 2015-08-11 14:23:26 +0000
|
17
|
@@ -35,6 +35,21 @@
|
18
|
* <li> p2j.clipboard
|
19
|
* </ol>
|
20
|
*/
|
21
|
+function setOwnPropertiesTo(obj, properties) {
|
22
|
+ if (!properties) {
|
23
|
+ return;
|
24
|
+ }
|
25
|
+ for (var prop in properties)
|
26
|
+ {
|
27
|
+ if (prop === "style")
|
28
|
+ {
|
29
|
+ setOwnPropertiesTo(obj.style, properties[prop]);
|
30
|
+ } else if (properties.hasOwnProperty(prop))
|
31
|
+ {
|
32
|
+ obj[prop] = properties[prop];
|
33
|
+ }
|
34
|
+ }
|
35
|
+}
|
36
|
var p2j = (function()
|
37
|
{
|
38
|
/** The top-level web client object which will be returned from this function. */
|
39
|
@@ -120,16 +135,7 @@
|
40
|
|
41
|
var canvas = document.createElement('canvas');
|
42
|
|
43
|
- if (settings)
|
44
|
- {
|
45
|
- for (var prop in settings)
|
46
|
- {
|
47
|
- if (settings.hasOwnProperty(prop))
|
48
|
- {
|
49
|
- canvas[prop] = settings[prop];
|
50
|
- }
|
51
|
- }
|
52
|
- }
|
53
|
+ setOwnPropertiesTo(canvas, settings);
|
54
|
|
55
|
parentElement.appendChild(canvas);
|
56
|
|
57
|
|