View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05694Bug reportsOtherpublic2012-03-14 21:08
Reportertpartner Assigned ToTMSWhite  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.92RC2 
Target Version1.92RC4Fixed in Version1.92RC4 
Summary05694: Map needs to be reset when shown by conditions/EM
Description

When a map question is shown by conditions the map will not be centered properly unless resetMap() is fired after the question is shown.

The call for resetMap() used to be inserted into checkconditions() but is not in 1.92.

Tom, see my patch (map_reset_fix_1.patch) to insert the call. I'm not sure this is the best place to insert it but it worked fine in my testing.

Steps To Reproduce

To reproduce the problem before applying the patch:

  • Load the attached survey
  • Click "Yes" in the first question
  • The map question will be shown but the map is not centered properly until the window is resized
Additional Information

resetMap() is in survey_runtime.js

TagsNo tags attached.
Attached Files
map_reset_fix_1.patch (1,049 bytes)   
Index: LimeExpressionManager.php
===================================================================
--- LimeExpressionManager.php	(revision 12197)
+++ LimeExpressionManager.php	(working copy)
@@ -4934,6 +4934,10 @@
                         // In such cases, PHP will make the question visible by default.  By not forcing a re-show(), template.js can hide questions with impunity
                         $jsParts[] = "  $('#question" . $arg['qid'] . "').show();\n";
                         $jsParts[] = "  $('#display" . $arg['qid'] . "').val('on');\n";
+                        $jsParts[] = "  if($('#question" . $arg['qid'] . " div[id^=\"gmap_canvas\"]').length > 0)\n";
+                        $jsParts[] = "  {\n";
+                        $jsParts[] = "      resetMap(" . $arg['qid'] . ");\n";
+                        $jsParts[] = "  }\n";
                     }
                 }
                 // If it is an equation, and relevance is true, then write the value from the question to the answer field storing the result
map_reset_fix_1.patch (1,049 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)12204
I will donate to the project if issue is resolvedNo
BrowserN/A
Database type & versionMySQL 5.1.41
Server OS (if known)Win
Webserver software & version (if known)Apache/2.2.14
PHP Version5.3.1

Users monitoring this issue

There are no users monitoring this issue.

Activities

TMSWhite

TMSWhite

2012-01-26 02:37

reporter   ~16978

tpartner - that is a perfect place for that call.

TMSWhite

TMSWhite

2012-01-26 04:29

reporter   ~16979

Fixed in revision 12205

c_schmitz

c_schmitz

2012-02-14 14:10

administrator   ~17440

1.92RC4 released

Related Changesets

LimeSurvey: Yii 6f83f38d

2012-01-25 19:31:20

TMSWhite

Details Diff
Fixed issue 05694: Map needs to be reset when shown by conditions/EM
Dev patch provided by tpartner

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12206 b72ed6b6-b9f8-46b5-92b4-906544132732
Affected Issues
05694
mod - application/helpers/expressions/em_manager_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-01-25 23:35 tpartner New Issue
2012-01-25 23:35 tpartner Status new => assigned
2012-01-25 23:35 tpartner Assigned To => TMSWhite
2012-01-25 23:35 tpartner File Added: limesurvey_survey_conditional_map.lss
2012-01-25 23:36 tpartner File Added: map_reset_fix_1.patch
2012-01-26 02:37 TMSWhite Note Added: 16978
2012-01-26 04:29 TMSWhite Note Added: 16979
2012-01-26 04:29 TMSWhite Status assigned => resolved
2012-01-26 04:29 TMSWhite Resolution open => fixed
2012-01-27 19:34 TMSWhite Target Version 1.92RC3 => 1.92RC4
2012-01-30 18:46 c_schmitz Fixed in Version => 1.92RC4
2012-02-14 14:10 c_schmitz Note Added: 17440
2012-02-14 14:10 c_schmitz Status resolved => closed
2012-03-14 21:08 TMSWhite Changeset attached => Import 2012-03-09 13:30:34 Yii 6f83f38d