Revision 147 branches/usability_v2/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/FLayoutZooms.java
FLayoutZooms.java | ||
---|---|---|
375 | 375 |
if (fframes[i] instanceof IFFrameUseFMap) { |
376 | 376 |
IFFrameUseFMap fframe = (IFFrameUseFMap) fframes[i]; |
377 | 377 |
|
378 |
if (((IFFrame) fframe).getSelected() != IFFrame.NOSELECT) {
|
|
378 |
if (fframe.isSelected()) {
|
|
379 | 379 |
|
380 | 380 |
Point2D vppo1 = FLayoutUtilities.screenCoordinatesToViewportImageCoordinates( |
381 | 381 |
poi1, fframes[i]); |
... | ... | |
385 | 385 |
Point2D.Double mapp1 = FLayoutFunctions.toMapPoint(vppo1, fframe.getATMap()); |
386 | 386 |
Point2D.Double mapp2 = FLayoutFunctions.toMapPoint(vppo2, fframe.getATMap()); |
387 | 387 |
|
388 |
// Borramos el anterior |
|
389 |
observers.notifyObservers(this, |
|
390 |
new DefaultLayoutNotification(LayoutNotification.LAYOUT_INVALIDATED)); |
|
391 | 388 |
Rectangle2D.Double r = new Rectangle2D.Double(); |
392 | 389 |
|
393 | 390 |
if (java.lang.Math.abs(poi1.getX() - poi2.getX()) <= 3) { |
... | ... | |
411 | 408 |
r.width = extent.getWidth() * factor; |
412 | 409 |
r.height = extent.getHeight() * factor; |
413 | 410 |
} |
414 |
|
|
415 |
// fframeAux.setNewExtent(r); |
|
416 | 411 |
} else { |
417 | 412 |
// Fijamos el nuevo extent |
418 |
|
|
419 | 413 |
r.setFrameFromDiagonal(mapp1, mapp2); |
420 |
|
|
421 |
// fframeAux.setNewExtent(r); |
|
422 | 414 |
} |
423 |
|
|
424 |
/* |
|
425 |
* if (fframe.getTypeScale()!=IFFrameUseFMap.AUTOMATICO) { |
|
426 |
* fframeAux.setNewExtent(r); |
|
427 |
* fframeAux.refresh(); |
|
428 |
* layout.getEFS().modifyFFrame((IFFrame)fframe,(IFFrame) |
|
429 |
* fframeAux); |
|
430 |
* ((IFFrame)fframeAux).getBoundingBox(layout.getAT()); |
|
431 |
* layout.updateFFrames(); |
|
432 |
* layout.setIsReSel(true); |
|
433 |
* }else { |
|
434 |
*/ |
|
435 | 415 |
try { |
436 | 416 |
fframe.setNewEnvelope(geomManager.createEnvelope( |
437 | 417 |
r.getX(), r.getY(), r.getMaxX(), r.getMaxY(), |
... | ... | |
439 | 419 |
} catch (CreateEnvelopeException e) { |
440 | 420 |
logger.error("Error creating the envelope", e); |
441 | 421 |
} |
442 |
fframe.refresh(); |
|
443 |
if (fframe.getLinked()) { |
|
444 |
fframe.refreshOriginalExtent(); |
|
445 |
} |
|
446 |
// /} |
|
447 |
// Fin del else |
|
448 |
// layout.repaint(); |
|
449 | 422 |
} |
450 | 423 |
} |
451 | 424 |
} |
... | ... | |
465 | 438 |
if (fframes[i] instanceof IFFrameUseFMap) { |
466 | 439 |
IFFrameUseFMap fframe = (IFFrameUseFMap) fframes[i]; |
467 | 440 |
|
468 |
if (((IFFrame) fframe).getSelected() != IFFrame.NOSELECT) {
|
|
441 |
if (fframe.isSelected()) {
|
|
469 | 442 |
|
470 | 443 |
double nuevoX; |
471 | 444 |
double nuevoY; |
... | ... | |
497 | 470 |
} catch (CreateEnvelopeException e) { |
498 | 471 |
logger.error("Error creating the envelope", e); |
499 | 472 |
} |
500 |
fframe.refresh(); |
|
501 |
if (fframe.getLinked()) { |
|
502 |
fframe.refreshOriginalExtent(); |
|
503 |
} |
|
504 | 473 |
} |
505 | 474 |
} |
506 | 475 |
} |
Also available in: Unified diff