Forums

Welcome Guest Search | Active Topics | Members

Orientation buttons Options
natebell
Posted: Thursday, July 19, 2007 2:10:28 PM
Rank: Member
Groups: Member

Joined: 3/28/2007
Posts: 56
Points: 0
I want portrait to be the default selected orientation for crop, but it is always on album or landscape, how do I change this?
Sergey Peshekhonov
Posted: Friday, July 20, 2007 12:42:40 AM
Rank: Advanced Member
Groups: Member

Joined: 6/6/2007
Posts: 54
Points: 36
Hello, Nate!

In the current version we have no public property for default orientation of crop rectangle. So, it is hardcoded.
But, I can offer you two workarounds:

1. You can change your CropEffect.js in the following way:
just replace string
Code:

this._orientation = "Album";

with:
Code:

this._orientation = "Portrait";

at the definition of local variables.

2. To get rid of changing our code you may add the following code to the end of your PhotoEditorSample.ascx:
Code:


    Sys.Application.add_load(function(e, t) {
        
        if (t.get_isPartialLoad()) return;
        
        // Get PhotoEditorController instance.            
        var pe = $find();
        if (!pe) return;
            
        // Get instance of CropEffect.
        var crop = pe.getEffectIdByType("Aurigma.PhotoEditor.Effects.CropEffect");
        if (!crop) return;
            
        crop = $find(crop);
        if (!crop) return;
                
        // Call private function which changes orientation.
        crop._onOrientationClick();
    });



Sincerely yours,
Sergey Peshekhonov.

Aurigma Technical Support Team.
natebell
Posted: Friday, July 20, 2007 6:29:50 AM
Rank: Member
Groups: Member

Joined: 3/28/2007
Posts: 56
Points: 0
Great, I'll just change CropEffect.js that seems easiest. Thanks for this tip!
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.