1
|
|
|
/** |
2
|
|
|
* (c) Kitodo. Key to digital objects e.V. <[email protected]> |
3
|
|
|
* |
4
|
|
|
* This file is part of the Kitodo and TYPO3 projects. |
5
|
|
|
* |
6
|
|
|
* @license GNU General Public License version 3 or later. |
7
|
|
|
* For the full copyright and license information, please read the |
8
|
|
|
* LICENSE.txt file that was distributed with this source code. |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* @const |
13
|
|
|
* @namespace |
14
|
|
|
*/ |
15
|
|
|
dlfViewerOL3Styles = {}; |
|
|
|
|
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* @return {ol.style.Style} |
19
|
|
|
*/ |
20
|
|
|
dlfViewerOL3Styles.defaultStyle = function() { |
21
|
|
|
|
22
|
|
|
return new ol.style.Style({ |
|
|
|
|
23
|
|
|
'stroke': new ol.style.Stroke({ |
24
|
|
|
'color': 'rgba(204,204,204,0.8)', |
25
|
|
|
'width': 3 |
26
|
|
|
}), |
27
|
|
|
'fill': new ol.style.Fill({ |
28
|
|
|
'color': 'rgba(170,0,0,0.1)' |
29
|
|
|
}) |
30
|
|
|
}); |
31
|
|
|
|
32
|
|
|
}; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @return {ol.style.Style} |
36
|
|
|
*/ |
37
|
|
|
dlfViewerOL3Styles.hoverStyle = function() { |
38
|
|
|
|
39
|
|
|
return new ol.style.Style({ |
|
|
|
|
40
|
|
|
'stroke': new ol.style.Stroke({ |
41
|
|
|
'color': 'rgba(204,204,204,0.8)', |
42
|
|
|
'width': 1 |
43
|
|
|
}), |
44
|
|
|
'fill': new ol.style.Fill({ |
45
|
|
|
'color': 'rgba(238,153,0,0.2)' |
46
|
|
|
}) |
47
|
|
|
}); |
48
|
|
|
|
49
|
|
|
}; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @return {ol.style.Style} |
53
|
|
|
*/ |
54
|
|
|
dlfViewerOL3Styles.invisibleStyle = function() { |
55
|
|
|
|
56
|
|
|
return new ol.style.Style({ |
|
|
|
|
57
|
|
|
'stroke': new ol.style.Stroke({ |
58
|
|
|
'color': 'rgba(170,0,0,0)', |
59
|
|
|
'width': 1 |
60
|
|
|
}) |
61
|
|
|
}); |
62
|
|
|
|
63
|
|
|
}; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @return {ol.style.Style} |
67
|
|
|
*/ |
68
|
|
|
dlfViewerOL3Styles.selectStyle = function() { |
69
|
|
|
|
70
|
|
|
return new ol.style.Style({ |
|
|
|
|
71
|
|
|
'stroke': new ol.style.Stroke({ |
72
|
|
|
'color': 'rgba(170,0,0,0.8)', |
73
|
|
|
'width': 1 |
74
|
|
|
}), |
75
|
|
|
'fill': new ol.style.Fill({ |
76
|
|
|
'color': 'rgba(238,153,0,0.2)' |
77
|
|
|
}) |
78
|
|
|
}); |
79
|
|
|
|
80
|
|
|
}; |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return {ol.style.Style} |
84
|
|
|
*/ |
85
|
|
|
dlfViewerOL3Styles.textlineStyle = function() { |
86
|
|
|
|
87
|
|
|
return new ol.style.Style({ |
|
|
|
|
88
|
|
|
'stroke': new ol.style.Stroke({ |
89
|
|
|
'color': 'rgba(170,0,0,1)', |
90
|
|
|
'width': 1 |
91
|
|
|
}) |
92
|
|
|
}); |
93
|
|
|
|
94
|
|
|
}; |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @return {ol.style.Style} |
98
|
|
|
*/ |
99
|
|
|
dlfViewerOL3Styles.wordStyle = function() { |
100
|
|
|
|
101
|
|
|
return new ol.style.Style({ |
|
|
|
|
102
|
|
|
'stroke': new ol.style.Stroke({ |
103
|
|
|
'color': 'rgba(238,153,0,0.8)', |
104
|
|
|
'width': 1 |
105
|
|
|
}), |
106
|
|
|
'fill': new ol.style.Fill({ |
107
|
|
|
'color': 'rgba(238,153,0,0.2)' |
108
|
|
|
}) |
109
|
|
|
}); |
110
|
|
|
|
111
|
|
|
}; |