Fixed a couple of small issues with the previews
This commit is contained in:
parent
7b6ad2ebcf
commit
f920adfa66
@ -2,6 +2,8 @@ package com.gloopics.g3viewer.client;
|
|||||||
|
|
||||||
import com.google.gwt.event.dom.client.ClickEvent;
|
import com.google.gwt.event.dom.client.ClickEvent;
|
||||||
import com.google.gwt.event.dom.client.ClickHandler;
|
import com.google.gwt.event.dom.client.ClickHandler;
|
||||||
|
import com.google.gwt.event.dom.client.ErrorEvent;
|
||||||
|
import com.google.gwt.event.dom.client.ErrorHandler;
|
||||||
import com.google.gwt.event.dom.client.LoadEvent;
|
import com.google.gwt.event.dom.client.LoadEvent;
|
||||||
import com.google.gwt.event.dom.client.LoadHandler;
|
import com.google.gwt.event.dom.client.LoadHandler;
|
||||||
import com.google.gwt.user.client.Window;
|
import com.google.gwt.user.client.Window;
|
||||||
@ -68,10 +70,20 @@ public class ImageDialogBox extends PopupPanel{
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
m_Image.addErrorHandler(new ErrorHandler() {
|
||||||
|
|
||||||
sp.setSize("0", "0");
|
@Override
|
||||||
|
public void onError(ErrorEvent event) {
|
||||||
|
sp.removeFromParent();
|
||||||
|
G3Viewer.displayError("Error Loading Image", "It could be that the resized version of the image has not been built correctly.");
|
||||||
|
Loading.getInstance().endLoading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
sp.setSize("0px", "0px");
|
||||||
|
sp.setStylePrimaryName("hideme");
|
||||||
sp.setWidget(m_Image);
|
sp.setWidget(m_Image);
|
||||||
RootPanel.get().add(m_Image);
|
RootPanel.get().add(sp);
|
||||||
|
|
||||||
m_Image.setUrl(a_Image);
|
m_Image.setUrl(a_Image);
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ public class Item extends Composite implements HasAllMouseHandlers{
|
|||||||
if (isAlbum()){
|
if (isAlbum()){
|
||||||
m_Parent.selectSubAlbum(m_ID);
|
m_Parent.selectSubAlbum(m_ID);
|
||||||
}
|
}
|
||||||
else {
|
else if (isPhoto()){
|
||||||
m_Container.showImage(m_Resized);
|
m_Container.showImage(m_Resized);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,3 +36,5 @@
|
|||||||
|
|
||||||
.dContents {padding: 2px 5px 2px 5px;}
|
.dContents {padding: 2px 5px 2px 5px;}
|
||||||
.dButtons {text-align: right}
|
.dButtons {text-align: right}
|
||||||
|
|
||||||
|
.hideme {overflow:hidden; width:0; height:0; margin:0; padding:0;}
|
Reference in New Issue
Block a user