summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermap.cpp
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-09-01 14:14:35 +0100
committerAimee Linden <aimee@lindenlab.com>2010-09-01 14:14:35 +0100
commit2b5cfc2a4d887e2ac354a7ba98e9dae50c1cc2ed (patch)
tree548a55659c827066162dd0c3113554d6e5de50de /indra/newview/llfloatermap.cpp
parent3cabca8df62ae8ee815dd7d885f14f5a7d0ea98d (diff)
VWR-13221 (SNOW-188) FIXED Allow panning of the minimap
Imported from Snowglobe.
Diffstat (limited to 'indra/newview/llfloatermap.cpp')
-rw-r--r--indra/newview/llfloatermap.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp
index 0f8b709f29..c9d7eff02b 100644
--- a/indra/newview/llfloatermap.cpp
+++ b/indra/newview/llfloatermap.cpp
@@ -47,7 +47,10 @@
//
// Constants
//
-const F32 MAP_MINOR_DIR_THRESHOLD = 0.08f;
+
+// The minor cardinal direction labels are hidden if their height is more
+// than this proportion of the map.
+const F32 MAP_MINOR_DIR_THRESHOLD = 0.07f;
const S32 MAP_PADDING_LEFT = 0;
const S32 MAP_PADDING_TOP = 2;
const S32 MAP_PADDING_RIGHT = 2;
@@ -93,7 +96,7 @@ BOOL LLFloaterMap::postBuild()
mTextBoxNorthWest = getChild<LLTextBox> ("floater_map_northwest");
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
-
+
registrar.add("Minimap.Zoom", boost::bind(&LLFloaterMap::handleZoom, this, _2));
registrar.add("Minimap.Tracker", boost::bind(&LLFloaterMap::handleStopTracking, this, _2));
@@ -255,7 +258,7 @@ void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent)
void LLFloaterMap::handleZoom(const LLSD& userdata)
{
std::string level = userdata.asString();
-
+
F32 scale = 0.0f;
if (level == std::string("close"))
scale = LLNetMap::MAP_SCALE_MAX;