Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
natebell  
#1 Posted : Thursday, July 19, 2007 6:10:28 AM(UTC)
natebell

Rank: Member

Groups: Member
Joined: 3/28/2007(UTC)
Posts: 56

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  
#2 Posted : Thursday, July 19, 2007 4:42:40 PM(UTC)
Sergey Peshekhonov

Rank: Advanced Member

Groups: Member
Joined: 6/5/2007(UTC)
Posts: 57

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  
#3 Posted : Thursday, July 19, 2007 10:29:50 PM(UTC)
natebell

Rank: Member

Groups: Member
Joined: 3/28/2007(UTC)
Posts: 56

Great, I'll just change CropEffect.js that seems easiest. Thanks for this tip!
Users browsing this topic
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.