Skip to content

Commit

Permalink
Fixed css problems
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoensing committed Feb 21, 2019
1 parent f69b98d commit 9fab6fa
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 33 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified COPY/.DS_Store
Binary file not shown.
Binary file modified COPY/Minecraft-Overviewer-minecraft113-fixed/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions COPY/Minecraft-Overviewer-minecraft113-fixed/docs/signs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ A more complicated filter function can construct a more customized display text:

def chestFilter(poi):
if poi['id'] == "Chest":
return "Chest with %d items" % len(poi['Items'])
return "Chest with %d items" % len(poi.get('Items', []))

It is also possible to return a tuple from the filter function to specify a hovertext
different from the text displayed in the info window. The first entry of the tuple will
be used as the hover text, the second will be used as the info window content::

def chestFilter(poi):
if poi['id'] == "Chest":
return ("Chest", "Chest with %d items" % len(poi['Items']))
return ("Chest", "Chest with %d items" % len(poi.get('Items', [])))

Because of the way the config file is loaded, if you need to import a function or module
for use in your filter function, you need to explicitly load it into the global namespace::
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@ overviewer.util = {
[],
ovconf.marker_groups, {collapsed: false}).addTo(overviewer.map);
}
for (var marker_group in ovconf.marker_groups) {
var mg = ovconf.marker_groups[marker_group];
if (mg.options.default_checked) {
mg.addTo(overviewer.map);
}
}

overviewer.util.updateHash();
});
Expand Down Expand Up @@ -334,17 +340,16 @@ overviewer.util = {
for (var mkidx = 0; mkidx < markers[obj.path].length; mkidx++) {
var marker_group = new L.layerGroup();
var marker_entry = markers[obj.path][mkidx];
var icon = L.icon({iconUrl: marker_entry.icon,
className: "ov-marker"});
L.Util.setOptions(marker_group, {default_checked: marker_entry.checked});
var icon = L.divIcon({html: `<img class="ov-marker" src="${marker_entry.icon}">`});
console.log("marker group:", marker_entry.displayName, marker_entry.groupName);

for (var dbidx = 0; dbidx < markersDB[marker_entry.groupName].raw.length; dbidx++) {
var db = markersDB[marker_entry.groupName].raw[dbidx];
var latlng = overviewer.util.fromWorldToLatLng(db.x, db.y, db.z, obj);
var m_icon;
if (db.icon != undefined) {
m_icon = L.icon({iconUrl: db.icon,
className: "ov-marker"});
m_icon = L.divIcon({html: `<img class="ov-marker" src="${db.icon}">`});
} else {
m_icon = icon;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ body {
line-height: 160%;
text-align: center;
padding: 0px 6px;

background-image: url('control-bg.png');
background-repeat: repeat-x;

border: 1px solid #A9BBDF;
border-radius: 2px 2px;
box-shadow: rgba(0, 0, 0, 0.347656) 2px 2px 3px;
Expand All @@ -81,11 +81,11 @@ body {
.customControl > div.dropDown {
font-size: 12px;
background-color: white;

border: 1px solid #A9BBDF;
border-radius: 2px 2px;
box-shadow: rgba(0, 0, 0, 0.347656) 2px 2px 3px;

display: none;
}

Expand Down Expand Up @@ -143,7 +143,7 @@ div#searchDropDown {

div.searchResultItem {
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
}

div.searchResultItem img {
Expand All @@ -165,9 +165,22 @@ div.worldcontrol select {
font-size: 1.2em;
}

.leaflet-control-container .progress.leaflet-control {
.leaflet-container .coordbox, .leaflet-container .progress {
box-shadow: none;
font-size: 11px;
background: rgba(255, 255, 255, 0.7);
margin: 0;
padding: 0 5px;
color: #333;
}

.ov-marker {
position:relative;
margin-left:-50%;
margin-top:-50%;
}

.leaflet-div-icon {
background: 0;
border: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@
#define INK8(ink) (*(UINT8*)ink)
#define INK32(ink) (*(INT32*)ink)

/* like (a * b + 127) / 255), but much faster on most platforms */
#define MULDIV255(a, b, tmp)\
(tmp = (a) * (b) + 128, ((((tmp) >> 8) + (tmp)) >> 8))

#define BLEND(mask, in1, in2, tmp1, tmp2)\
(MULDIV255(in1, 255 - mask, tmp1) + MULDIV255(in2, mask, tmp2))

/* -------------------------------------------------------------------- */
/* Primitives */
/* -------------------------------------------------------------------- */
Expand Down Expand Up @@ -100,14 +93,14 @@ point32(Imaging im, int x, int y, int ink)
static inline void
point32rgba(Imaging im, int x, int y, int ink)
{
unsigned int tmp1, tmp2;
unsigned int tmp1;

if (x >= 0 && x < im->xsize && y >= 0 && y < im->ysize) {
UINT8* out = (UINT8*) im->image[y]+x*4;
UINT8* in = (UINT8*) &ink;
out[0] = BLEND(in[3], out[0], in[0], tmp1, tmp2);
out[1] = BLEND(in[3], out[1], in[1], tmp1, tmp2);
out[2] = BLEND(in[3], out[2], in[2], tmp1, tmp2);
out[0] = BLEND(in[3], out[0], in[0], tmp1);
out[1] = BLEND(in[3], out[1], in[1], tmp1);
out[2] = BLEND(in[3], out[2], in[2], tmp1);
}
}

Expand Down Expand Up @@ -159,7 +152,7 @@ static inline void
hline32rgba(Imaging im, int x0, int y0, int x1, int ink)
{
int tmp;
unsigned int tmp1, tmp2;
unsigned int tmp1;

if (y0 >= 0 && y0 < im->ysize) {
if (x0 > x1)
Expand All @@ -176,9 +169,9 @@ hline32rgba(Imaging im, int x0, int y0, int x1, int ink)
UINT8* out = (UINT8*) im->image[y0]+x0*4;
UINT8* in = (UINT8*) &ink;
while (x0 <= x1) {
out[0] = BLEND(in[3], out[0], in[0], tmp1, tmp2);
out[1] = BLEND(in[3], out[1], in[1], tmp1, tmp2);
out[2] = BLEND(in[3], out[2], in[2], tmp1, tmp2);
out[0] = BLEND(in[3], out[0], in[0], tmp1);
out[1] = BLEND(in[3], out[1], in[1], tmp1);
out[2] = BLEND(in[3], out[2], in[2], tmp1);
x0++; out += 4;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

// increment this value if you've made a change to the c extesion
// and want to force users to rebuild
#define OVERVIEWER_EXTENSION_VERSION 54
#define OVERVIEWER_EXTENSION_VERSION 55

/* Python PIL, and numpy headers */
#include <Python.h>
Expand All @@ -42,11 +42,6 @@
/* Fix Pillow on mingw-w64 which includes windows.h in Imaging.h */
#undef TRANSPARENT

/* like (a * b + 127) / 255), but much faster on most platforms
from PIL's _imaging.c */
#define MULDIV255(a, b, tmp) \
(tmp = (a) * (b) + 128, ((((tmp) >> 8) + (tmp)) >> 8))

/* macro for getting a value out of various numpy arrays the 3D arrays have
interesting, swizzled coordinates because minecraft (anvil) stores blocks
in y/z/x order for 3D, z/x order for 2D */
Expand Down

0 comments on commit 9fab6fa

Please sign in to comment.