if ( isgrid ) {
this.photoscale = canvas.tools.zoomscale;
this.photodimension = 70;
this.spacing = 50;
this.skew = 0;
this.pivot_x = 50;
yinset = 50;
xinset = 0;
this.pivot_y = 0;
this.yspacing = 50;
this.xspacing = 50;
this.pivotindex=0;
} else {
this.photodimension = 50;
this.photoscale = 1;
this.skew = 1;
//this.pivot_x = 50;
this.pivot_y = 405;
this.yspacing = -50;
this.xspacing = 10;
pivotindex=0;
}
this.update();
this.animate('dimmer',1,500);
//canvas.details.ph.posme.doStart();
//canvas.details.loadMediumImage();
this.updateOnIdle( false );
// locate the details photo to that of the selected photo
//Debug.write("ph_arg: ", ph_arg);
//Debug.write("ph_arg.intparent: ", ph_arg.intparent);
//Debug.write("ph_arg.intparent.interior", ph_arg.intparent.interior);
var v = ph_arg.intparent.interior;
//Debug.write("transitionToDetails");
canvas.details.ph.setAttribute('x', v.getAttributeRelative('x', canvas) -1 );
canvas.details.ph.setAttribute('y', v.getAttributeRelative('y', canvas) -1 );
var maxdim = (v.width > v.height) ? v.width + 2 : v.height + 2;
canvas.details.ph.setAttribute('width', maxdim );
canvas.details.ph.setAttribute('height', maxdim );
canvas.details.setAttribute('visible', true );
this.lyt.setAttribute('textvisible',false);
this.lyt.setAttribute('isgrid',false);
//photoscontainer.lyt.registeronly( ['onskew','onphotodimension', 'ondimmer'] );
//adjust an animation parameter before starting transition
this.lyt.updateOnIdle( true );
canvas.interior.details_bkgnd.setAttribute('height', 2);
canvas.interior.details_bkgnd.setAttribute('visible', true );
this.lyt.transitiontolinear_anm.grp.yspacing.setAttribute('to', -photoscontainer.lyt.photodimension*photoscontainer.lyt.photoscale);
this.lyt.transitiontolinear_anm.doStart();
// canvas.details.ph.posme.doStart(); //max's edit?
//anm_openphotodetails.doStart();
this.lyt.transitiontogrid_anm.doStart();
//Debug.write("TOOLS back onclick", photoscontainer.detailphoto);
canvas.interior.details_bkgnd.setAttribute('height', 0);
canvas.interior.details_bkgnd.setAttribute('visible', false );
this.lyt.isgrid = true;
this.lyt.myreset();
this.lyt.setAttribute('textvisible',true); this.lyt.update();
this.showPhotoDetails( false );
tls.enableZoom();
//Debug.write('ondata');
//Debug.write(this.pagecounter_dp);
this.initialReplicationDone();
// create a method to be called when the last photo view is created
// find out how many images there are
if (! this.pagecounter_dp.p) return;
var c = this.pagecounter_dp.p.childNodes.length;
var currentpage = this.pagecounter_dp.xpathQuery('@page');
var perpage = this.pagecounter_dp.xpathQuery('@perpage');
var totalpages = this.pagecounter_dp.xpathQuery('@pages');
photoscontainer.lyt.setAttribute('currentpage', currentpage);
photoscontainer.lyt.setAttribute('perpage', perpage);
photoscontainer.lyt.setAttribute('totalpages', totalpages);
tls.setpPagingParams( c );
gResultsCountLabel.setAttribute('text', this.buildResultsString(c) );
this.watchforlast();
photoscontainer.lyt.calcpageparams = true;
//info('watchforlast');
if (! this.ph['clones']) return;
var lc = this.ph.clones[ this.ph.clones.length-1 ];
//Debug.write("ondata ( dataset ): lc .......................................",lc);
this.doneDel.unregisterAll();
if (lc != null) {
this.doneDel.register( lc, "oninit" );
}
= 100) {
str = "Found hundreds of photos";
} else if (num >= 0) {
str = num + " photos found";
}
return str;
]]>
return lz.Keys.isKeyDown( "control" ) || lz.Keys.isKeyDown( "shift" ) ||
parent.isRectangleSelecting;
x2 ){
var tmp = x1;
x1 = x2;
x2 = tmp;
}
if ( y1 > y2 ){
var tmp = y1;
y1 = y2;
y2 = tmp;
}
for ( var i = subviews.length-1; i >=0; i-- ){
var sv = subviews[ i ];
if ( ! ( sv instanceof lz.photo ) ) continue;
if ( sv.intersectsRectangle( x1, y1, x2 , y2 ) ){
selman.select( sv );
}
}
this.setAttribute( "isRectangleSelecting", false );
]]>
if ( parent.selman.isMultiSelect(null) ){
// Debug.write( this , " other click." );
parent.selman.select( this );
} else {
// there are two states to the photo collection..
// grid-mode and list-mode. if in grid mode
// clicking on details will invoke a transition, while
// clikcing on details in list-mode is a simpler ( fade ) transition
if ( parent.lyt.isgrid ) {
canvas.details.setImage( this.getImageURL('t'), this.getImageURL('') );
photoscontainer.lyt.pivotAround(this);
photoscontainer.lyt.setAttribute('dimmer',0.2); //a visual affect that can be eliminated if need be.
parent.transitionToDetails( this );
parent.showPhotoDetails( true, this );
} else {
// Ignore this click if this photo is already the detailsphoto
if (photoscontainer.detailphoto == this) {
return;
} else {
canvas.details.setImage( this.getImageURL('t'), this.getImageURL('') );
parent.showPhotoDetails( true, this );
}
}
photoscontainer.detailphoto = this;
}
super.startDrag(offx, offy);
if ( !isselected ) parent.selman.select( this );
gDragged.startDrag( this, parent.selman.getSelection() , offx, offy );
super.stopDrag();
gDragged.stopDrag( );
parent.selman.clearSelection();
this.borderbg.setAttribute('bgcolor', s ? "0xFFD800" : "0xFFFFFF");
this.setAttribute( "isselected" , s );
this.intparent.setAttribute('opacity', s ? .5 : 1 );
x1 && x < x2 &&
y + height > y1 && y < y2;
]]>
this.setAttribute('visible', true );
this._sx = parent.getMouse( "x" );
this._sy = parent.getMouse( "y" );
this.updel.register( lz.Idle, "onidle" );
this.bringToFront();
this.update();
this.setAttribute('visible', false );
this.updel.unregisterAll();
this.parent.selectInRectangle( this._sx , this._sy ,
this.parent.getMouse( 'x' ),
this.parent.getMouse( 'y' ) );
if ( lyt.isgrid ) rubberband.starter();
rubberband.stopper();
hide details
photoscontainer.transitionToGrid();
this.parent.large_cam.setAttribute('visible', false );
this.parent.little_cam.setAttribute('visible', true );
photoscontainer.setAttribute('visible', false);
//Debug.write("sendsearch: photoscontainer.lyt.lock called");
photoscontainer.lyt.isgrid = true;
photoscontainer.lyt.myreset();
photoscontainer.lyt.lock();
canvas.spnr.setAttribute('visible', true );
photoscontainer.lyt.transitiontogrid_anm.doStart();
canvas.details.setAttribute('visible', false );
if (this.firsttime) {
this.firsttime = false;
photoscontainer.lyt.calcpageparams = true;
} else {
photoscontainer.lyt.calcpageparams = false;
}
tls.reset();
tls.enableZoom();
gResultsCountLabel.setAttribute('text', "...searching...");
super.sendsearch();
if ( o ) {
this.topview.anm.doStart();
this.bottom.anm.doStart();
this.isopen = true;
this.links.setAttribute('visible', false );
return this.bottom.anm;
}