J'ai une page qui sur mon FF 3.6.10 n'arrête pas de se redimensionner vers la droite.
La boite "Outils" disparait au bout de quelques itérations!
Cela est très certainement une conséquence d'une mise en page incorrecte...
J'ai une page qui sur mon FF 3.6.10 n'arrête pas de se redimensionner vers la droite.
La boite "Outils" disparait au bout de quelques itérations!
Cela est très certainement une conséquence d'une mise en page incorrecte...
J' ai aussi firefox 3.6.10 et cela ne m'est jamais arrivé, il faudrait un code ou un lien pour tester.
Voici ma page d'essai
http://atlasnw.free.fr/geoportail/exemples/json.html
Bonjour,
Est-ce que cela ne serait pas le fait de mettre infinity, a ce que je me rappelle dans les codes que j'ai vu c'était plutot -180, +180 à l'horizontal et 90 -90 à la verticale pour ce code :
ps: je ne pourrai répondre que ce soir
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 Function: initBounds initialise les bornes Parameters: Returns: */ this.initBounds = function () { console.log('initBounds()'); this.minX = Infinity; this.maxX = -Infinity; this.minY = Infinity; this.maxY = -Infinity; };
Ce ne peut pas être la fin de balise </div> manquante???
Ce serait trop simple!
Je viens d'envoyer la page modifiée et même punition.
J'ai aussi le problème sous FF3.6.10 Linux
Pour vérifier pourquoi le container d'étend, pourrais-tu rajouter ceci dans ta page (la méthode est appelée jusqu'à ce que la taille soit la bonne) :
Ce code est celui de développement ... Avec les bons points d'arrêt on devrait voir ce qui provoque ce comportement
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94 /** * APIMethod: setInformationPanelVisibility * Allows to show or not the information panel (the blue bar just under the * map). * * Parameters: * b - {Boolean} If true, show the panel, if not, do not show it. */ Geoportal.Viewer.Default.prototype.setInformationPanelVisibility= function(b) { if (this.mode=="mini") {b= false;} if (this.timeout[b]) { window.clearTimeout(this.timeout[b]); this.timeout[b]= null; } var reload= false; if (!b && this.timeout[!b]) { reload= true; } else { var rh= this.div.offsetHeight; var loading= this.ready.h==-1; if (loading) { if (/\d(%|em|pt)/.test(this.div.style.height)) { rh= Geoportal.Util.convertToPixels(this.div.style.height,false,this.div.parentNode) || rh; } else { rh= parseInt(this.div.style.height) || rh; } var bh= this.mapCell.offsetHeight - this.mapCell.clientHeight;//border-top + border-bottom var bw= this.mapCell.offsetWidth - this.mapCell.clientWidth;//border-left + border-right var h= rh - (this.infoCntrl? this.mapInfoDiv.offsetHeight : 0) - bh; var w= this.div.offsetWidth - bw; this.ready.h= h; this.ready.w= w; this.ready.b= bh; reload= !this.isMapReady(b); this.mapTbl.style.height= rh+'px';//table } if (b) { this.mapCell.style.height= this.ready.h+'px'; if (this.infoCntrl) { this.infoCntrl.div.style.display= ""; } } else { this.mapCell.style.height= (rh-this.ready.b)+'px'; if (this.infoCntrl) { this.infoCntrl.div.style.display= "none"; } } if (this.infoCntrl) { this.infoCell.style.height= this.mapInfoDiv.offsetHeight+'px'; } this.mapCell.style.width= this.ready.w+'px'; this.mapDiv.style.height= this.mapCell.style.height; this.mapDiv.style.width= this.mapCell.style.width; if (loading) { reload= reload || !this.isMapReady(b); } } if (reload) { if (b || (!b && !this.timeout[!b])) { this.ready.h= -1; } this.timeout[b]= window.setTimeout(OpenLayers.Function.bind(function(b){this.setInformationPanelVisibility(b);},this,b),500); } else { this.setSize(this.div.offsetWidth, this.div.offsetHeight); } }; /** * APIMethod: isMapReady * Checks whether the map's div is rendered or not. * * Returns: * {Boolean} true if ready, false otherwise. */ Geoportal.Viewer.Default.prototype.isMapReady= function() { var b= arguments[0]; var ready= ( this.mapTbl!=null && this.mapCell!=null && (this.infoCntrl? this.infoCell!=null : true) && (this.infoCntrl? this.mapInfoDiv!=null : true) && this.div!=null && !(this.mapCell.clientHeight==1) && (this.infoCntrl? this.mapCell.clientHeight>this.infoCell.clientHeight : true) && (this.infoCntrl? this.mapInfoDiv.offsetHeight==this.infoCell.offsetHeight : true) && this.div.offsetWidth==this.div.scrollWidth && this.div.offsetWidth==this.mapTbl.offsetWidth && this.div.offsetWidth==this.mapTbl.scrollWidth && this.div.offsetHeight==this.div.scrollHeight && this.div.offsetHeight==this.mapTbl.offsetHeight && this.div.offsetHeight==this.mapTbl.scrollHeight && this.mapDiv.clientWidth==parseInt(this.mapCell.style.width) && this.mapDiv.clientHeight==parseInt(this.mapCell.style.height) ) && !( this.timeout && ((b!=undefined && this.timeout[b]) || (b==undefined && (this.timeout[true] || this.timeout[false]))) ); return ready; };
Sur http://atlasnw.free.fr/geoportail/exemples/json.html, le code est présent.
Il est bien activé (cf la console firebug).
J'ai simplifié ma page pour le debug.
Cela ne boucle plus, mais cela tronque à droite...
Didier!
Mais le code de l'API a peut-être encore à se protéger contre ses utilisateurs...
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager