Ещё один сквознячек для линкомаулии!

Contact Page

Contacts
Developer photo
Ukraine,
Sevastopol

Feel free to contact me by e-mail
address Email Address

My favorite links:
Javascript is the most fantastic language people ever spoken in the web

Feedback

Please send me your feedback on the Marquee tool. You can leave any comments you have below on the comment area. Thank you.

Users comments about Marquee Tool

1. Geert Van Huychem (Apr, 02 2007 at 06:22 AM)


Hi, Excellent piece of coding!

When are you planning the release of the new version? I'm particularly interested in the ability to manage several marquees on the same picture. This would be very handy for my next project (extracting individual articles from a newspaper).

Kind regards,

Geert

2. Sergey Koksharov (Apr, 02 2007 at 12:35 PM)


Thanks to all for interest to this application.
I'm planning to release the next version in 1-2 weeks. All welcome!

Regards, Sergey.

3. Marcus (Apr, 10 2007 at 12:26 AM)


Sergey,
This looks very good indeed. I can't see how I can save the highlighted thumbnail image to the server? Is there an ASP example code you can point me to so I can do this please?
Thanks
Marcus

4. Harrison (Apr, 10 2007 at 08:05 PM)


This is amazing. Incredible job! I've been playing with this for a few hours now and I love it. It is exactly what I've been been trying to create, but without any luck. I wish I found it sooner!

I have one question... is there a way to set the marquee to a specific proportion, and have it keep those proportions when it is resized? I may have overlooked it, but is there a way for me to add this functionality on my own? Thank you very much!

5. Johannes Bayer (Apr, 29 2007 at 02:30 AM)


Hello Sergey,

i would like to use your script in our KNX@Home application, do you have (beside the MIT-License) any requests i have to fulfill to use your software?

By the way: its a great script, and we will use it to draw clickable areas!

Regards
Johannes

6. Sergey Koksharov (May, 02 2007 at 10:50 AM)


Johannes, you haven't to fulfill something for using that application :)
I took into consideration all items from people who posted comments and realized all in new version. Will test and upload soon.

Regards, Sergey.

7. Simon (May, 22 2007 at 02:50 PM)


hi, nice piece of code - somehow the select(id) doesn't work as espected , e.g.

function myselect(id){
RectMarquee.select(id);
}

never jumps into the
if (this.activeId !== id && this.items.length > 1) {...select the thing...}
block - haven't debugged but you know how to fix this?

greets and keep up the good work!

8. Aart Jan (May, 27 2007 at 11:53 AM)


Hi Sergey,

amazing piece of work, this tool! Unfortunately the downloadlink doesn't point to the right place...

Thanx anyway, for now I'll continue trying to rip your online demo-version ;)

AJ

9. Sergey Koksharov (May, 27 2007 at 11:35 PM)


Aart Jan, sorry for yersterday broken download link and thanks for reminding. I've fixed this problem.

10. Michel (Jun, 15 2007 at 05:19 AM)


Privet Sergey,

I would like to be able to click/doubleclick on the image
For example for the marquee tool to respect a client side image map and allow a hand/pointer on coordinates
Perhaps I just overlooked something?

Thanks for a great tool from a great country ;)
Michel

11. Sergey Koksharov (Jun, 16 2007 at 04:47 AM)


Thanks for your notice, Michel!

Unfortunately its impossible now to handle clicks on images. But I'll add method for setting handler. I'll email you about updates.

Regards, Sergey

12. Geert Van Huychem (Jun, 21 2007 at 01:58 AM)


Hi Sergey,

I'm facing the same problem as Simon (may 22th). I've added several marquees to the same picture, but somehow, i cannot switch between the marquees, that is, i cannot modify the previously added marquees, only the last one added. Also, the opacity gets higher everytime I add a marquee.

Thanks in advance for your help.

Regards, Geert

13. Sergey Koksharov (Jun, 21 2007 at 05:22 AM)


Hi, Geert Van Huychem!

It seems what Simon and you are trying to use the same id as for image.
When you've created marquee object you can get id with following code

var rmt = new MarqueeTool('myimageid');
var firstid = rmt.getId();
// add other marquee
rmt.add('secondimageid');
var secondid = rmt.getId();

Then you can use select marquee by code

rmt.select(firstid);
// some actions here ...
rmt.select(secondid);


May be this is small inconvenience to use other ids for image and objectid, I'll try to fix it in next release.

Also see first example on
http://www.marqueetool.net/examples/common-use-of-dhtml-marquee-tool/
and try to create several marquees by hotkeys ('Shift + N');
then try to select marquee also with hotkey ('S');
All working well.
I've not completed to write documentation, may be here is problem. I'll do my best to have documentation completed by the end of month. Also come back to this site in around 1-2 weeks, I'll prepare good example with several marquees.

Thanks too all of you for your interest and help.

Regards, Sergey.
P.S. If you have any questions or want to show me your adaptation (or problem with adaptation) of MarqueeTool, please ask.

14. Derek Broughton (Jul, 08 2007 at 02:20 PM)


Beautiful, and almost exactly what I was looking for. I have just one question: How can I intercept the creation of new Marquees (ie, when they're created by Shift-N)/ I want to use a "setOnUpdateCallback" on each new Marquee, but I only have (obvious) access to the one I create initially.

This is one really slick application!

15. Derek Broughton (Jul, 08 2007 at 03:14 PM)


setOnUpdateCallback(callback) doesn't seem to function as documented.

First, it says "Set callback function for event when dragging is finished", but clearly it is called repeatedly _while_ an edge is dragged, not when finished. It would be nice to have a callback that is actually invoked only when the drag finishes - or at least a way to know the drag is finished when you're in this callback.

Secondly, it doesn't seem to be passing x,y,w,h (at least in Firefox), and your example page doesn't use those arguments, either.

16. Jannik Nielsen (Aug, 16 2007 at 01:19 AM)


Hi,

I love your tool.

I have 2 feature requests.

I would like to be able to set Ratio og AllowResize through a function, so that I can have a list of preset sizes and ratios that the users can select between and then apply it from a script.

Please keep up the good work.

Thanks.

Jannik

17. Jannik Nielsen (Aug, 18 2007 at 02:41 AM)


Uh... I would also like to have a min width, max width, min height and max height of the marquee.

I should work so that the marquee can not be resized to smaller than min and greater than max.

That would be a really nice feature.

Thanks again.

18. Jannik Nielsen (Sep, 17 2007 at 04:55 AM)


Hey again.

I fixed a bug. When using keypresses the onUpdate function is not called.

I have added this to the buttom of the keypress function (line 663)

var options = this.items[this.activeId].options;
if (typeof options.onUpdate == 'function')
options.onUpdate();

I hope you will have the time to add more functions soon.

19. Glitter Text Maker (Sep, 28 2007 at 02:58 PM)


Amazing tool!
I'll use it for my new project

Thanks!

20. Ilya sh (Oct, 01 2007 at 02:37 PM)


Sergey, I am trying to use the one which passes the args to a server side script for cropping.

When I uploaded your test code.. I get an error "PreviewToolTip' not found.

If I comment it out... then the hidden boxes nor the span seem to update.

I'm not using PHP [java server pages actually] so I changed the JS to:

coordsform.x.value = coords.x1;
coordsform.y.value = coords.y1;
coordsform.w.value = coords.width;
coordsform.h.value = coords.height;
document.getElementById('sample_x').innerHTML = coords.x1;
document.getElementById('sample_y').innerHTML = coords.y1;
document.getElementById('sample_w').innerHTML = coords.width;
document.getElementById('sample_h').innerHTML = coords.height;


Is that correct?

And then I get another error: "style is null or not an object"

Why isnt the preview thing working?

Thanks for your help!
Thanks for your help.

21. Carlos Sica (Oct, 02 2007 at 04:08 AM)


Hi guys!
I'm not able to run the crop tool.
The coordinates doesn't appear on the x,y,w,h points.
The message "PreviewToolTip is not defined" appears.
The message "Marqueetool is not defined" appears.
So, the crop doesn't work.
Could you help me?

var MarqueeTool;
function onMarqueeUpdate(){
alert("teste");
var coords = MarqueeTool.getCoords();
$('sample_x').innerHTML = $('coord_x').value = coords.x1;
$('sample_y').innerHTML = $('coord_y').value = coords.y1;
$('sample_w').innerHTML = $('coord_w').value = coords.width;
$('sample_h').innerHTML = $('coord_h').value = coords.height;
}
function onWindowLoad(){
new PreviewToolTip('element_container', {
id: 'preview'});
MarqueeTool = new Marquee('sampleid',{
preview: 'preview',
color: '#333',
opacity: 0.75 });

MarqueeTool.setOnUpdateCallback(onMarqueeUpdate);
}
Event.observe(window, 'load', onWindowLoad);
var RectMarquee;
function initLoad(){
RectMarquee = new Marquee('sampleid', {color: '#F60', opacity: 0.45});
}
var coords = Marqueetool.getCoords();
// coords.leftTop - left top corner
// coords.rightBottom - right bottom corner

new Ajax.Request(server_url, {parameters: 'x=' + coords.x1 + '&y=' + coords.y1 + '&width=' + coords.width + '&height=' + coodrs.height, onComplete: onSendCoordsComplete});

// coords.dims - dimensions
var square = coords.dims[0] * coords.dims[1];

x: 0px
y: 0px
w: 0px
h: 0px

22. Ilya sh (Oct, 02 2007 at 11:19 AM)


You have to add the previewtt.js to your script...

get it from his site:

http://marqueetool.net/js/previewtt.js

I wasn't able to get the preview working either though.. I kept getting 'style' not object or something similar.
Maybe sergey has something to say?

23. Sergey Koksharov (Oct, 10 2007 at 08:45 AM)


Hi Ilya and Carlos!

I don’t thought my script to use my preview tool object for other people but now I think it need to open this code too.
You need just follow these steps:

1) Make sure what you've included javascripts in your html
prototype.js, scriptaculous.js, effects.js, previewtt.js

2) Include these lines in your css file
.previewPimp {
position: absolute;
font-size: 1px;
line-height: 1px;
height: 16px;
width: 16px;
overflow: hidden;
right: 5px;
bottom: 6px;
border: 3px solid #fff;
background: url(/images/preview_pimp.gif) no-repeat top #fff;
z-index: 1001;
cursor: pointer;
}

.previewWindow {
font-size: 1px;
line-height: 1px;
position: absolute;
right: 5px;
bottom: 6px;
z-index: 1000;
border: 3px solid #fff;
background: url(/images/preview.gif) no-repeat center #333;
}

Copy images http://marqueetool.net/images/preview_pimp.gif and
http://marqueetool.net/images/preview.gif to your folder

3) In html where you have image to crop use following html
<div style="position: relative;width:510px;margin:0 auto;" id="element_container"><img src="/images/examples/image2.jpg" alt="" id="sampleid" /></div>

Where position: relative is important.

4) Use my code for generating preview tool
new PreviewToolTip('element_container', {id: 'preview'});
and then

5) Use code to create marquee
new Marquee('sampleid', {
preview: 'preview',
color: '#333',
opacity: 0.45,
coords: {x1: 63, y1: 98, width: 223, height: 235}
});

6) Link to our site if you can! ;)
<a href="http://marqueetool.net">Marquee Tool - Javascript Image Cropper</a>


Best regards,
Sergey K.
http://marqueetool.net

24. Adrian (Dec, 05 2007 at 08:55 AM)


Hi Sergey,

It is a great tool, thank you for sharing it - i will use it on my projects.

Best Regards,
Adrian

25. Sergey Koksharov (Jan, 16 2008 at 01:51 PM)


I'm preparing a new version on JQuery. If anybody interested - welcome back in a few weeks!

Regards,
Sergey

26. Ben Griffiths (Feb, 01 2008 at 03:27 AM)


Hi Sergey, fantastic tool you have made here! I have a question: Its possible to initiate a marquee - but is it possible to "turn it off" again? I have a situation where people will be using it for tagging images, but if they click the button in error I can't figure out how to let them switch it off ;)

Also, how soon do you think the JQuery version will be ready?

Thanks,
Ben.

27. Joe Young (Feb, 04 2008 at 01:11 PM)


Talented Guy,Once i used for a template Slicing.

Thanks

28. Svetlana, Russia (Apr, 10 2008 at 10:42 AM)


Sergey, thank you!

Good job!
It is very usefull and excellent tool.

29. Shane (Jul, 29 2008 at 06:21 AM)


This is very nice work. I am looking forward to the jQuery version.

30. coupon (Sep, 25 2008 at 04:02 PM)


I have a website in ASP and i have to resize/crop image, then you solution is very usefull for me ! Just, if you can devellop resize function it will be great !

31. Jon D (Oct, 13 2008 at 02:30 PM)


One important option not covered in the documentation is the ratio, for setting specific proportions. I'm glad I discovered it, because without it I would have had to write my own code.

I LOVE this tool! Thank you!

32. Shirley Collier (Nov, 26 2008 at 02:48 AM)


I have Photoshop CS3. Following instructions to create a banner, I got stuck because I could not find a way to resize the marquee rectangle drawn inside a rectangle in a contrasting color. And, further I cannot figure out how to draw a second larger marquee to create a border.
Yes I'm a beginner.

33. Vikrant (Jan, 22 2009 at 10:57 AM)


I Like this tool...

34. Pawel (Apr, 28 2009 at 01:18 AM)


Hello, a first i wanna say that i like this tool very much, but i have some question: how to use enable / disable functions ?
i've got defined
var MarqueeTool;
function onWindowLoad()
{
MarqueeTool = new Marquee('imgMap', {
color: '#333', opacity: 0.45, ratio: 2 ,hideEdges: true, allowResize: false,ballowHotKeys: false});
MarqueeTool.setOnUpdateCallback(onMarqueeUpdate);
var id = MarqueeTool.getId();
MarqueeTool.disable(id);
}
Event.observe(window, 'load', onWindowLoad);

and when i'm trying to do

var id = MarqueeTool.getId();
MarqueeTool.enable(id);

i'm getting this error in FF javascript console:

Error: uncaught exception: [Exception... "Cannot modify properties of a WrappedNative" nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)" location: "JS frame :: chrome://global/content/bindings/autocomplete.xml :: onxblpopuphiding :: line 834" data: no]

could you help me?

35. Ruscon (May, 12 2009 at 08:07 PM)


Приветствую.
Последнее обновление было в 2007 году аж.
Будут ли новые обновления, хотя бы переход на новую версию prototype ?

(google translate)
Greetings.
The last update was in 2007 already.
Will the new update, even if the transition to the new version prototype?

36. Milos Horky (May, 25 2009 at 01:29 AM)


Helo,
I like your work, I would like to know more about, how are you doing such a things.
No good, really nice.
But - please, I would like to use this script, but I want to give fixed coords, opacity and color there.

In lower part of your page there is such a possibility, but It won't work or I am doing something wrong.
There is always the possibility to change coordinates. For me is important, that I make a choice about the highlighted area...

Did you check it or I am doing something wrong.

Thanks for reply.

Regards.

Milos

37. sakda (Jun, 25 2009 at 04:48 PM)


Greetings,

I find a lot of tools and found this tool is greatest. I will try to add "overlay image" to it so the user can see the logo that will have been compose to the image after crop. any suggestion?

JQuery is good tool very powerful. I see it when I try to testing Jcrop.
This will be great if it is marqueetool with JQuery.

thank you.

38. Ankit Sharma (Sep, 24 2009 at 01:23 PM)


Dear Sergey,

You have created a wonderfull tool.
But I am having problem to put the frame or cropping coordinate on my image. Can you please help me. From where did you took these two scriptaculous.js, effects.js javascripts.

Thanku for your help.

With Regards,
Ankit Sharma

39. Violet ren (Sep, 28 2009 at 09:47 AM)


Dear Sir/Madam;
My name is Violet ren, I am very glad to know your company from web and writing to you to explore the possible cooperation with you .I'm marketing for Starda Mould (HK) Co.,Ltd.Our company located in international mould manufacturing base,ShenZhen China.if you want know more for our company,please visit our WEBSITE: WWW.STARDA-MOULD.COM.

Starda Mould is a high technology engineering company specializing in the design and manufacture of molds for the plastics, rubber and die casting industries.Starda Mould know-how combined with extremely favourable costs of production provide competitive advantages internationally. Our staffs are very good at communicating in English. They will manage your projects wholly for every process.

If you have some projects in hand, please do not hesitate to send us for quoting.We will reply you in 24 hours and will quote to you very competitive price within two working days or earlier also, we will provide to you high quality products and best service.If you have any questions or comments,please contact us Email;Violet@starda-mould.com.Or stardamould@163.com.

Awaiting your kindly reply

Best Regards.
Violet Ren
Tel:86-755-28842885 Fax:86-755-28842870
Add: No 43.PingLong East Road.Pinghu.Town.ShenZhen City China

40. Tahir Awan (Oct, 12 2009 at 03:15 PM)


Hi,

I am using your marquee tool and I am very thankful to you, for the nice work.
I want you little help regarding the hotspots, i need more then 2 hotspots of an image a one time, and these hotspots should overlap on each other.
can you please help me in getting more the 2 hotspots of an image without overlapping them.
I will be very thankful to you

best regards
Tahir

41. Tahir Awan (Oct, 12 2009 at 03:21 PM)


Hi,

I am using your marquee tool and I am very thankful to you, for the nice work.
I want your little help regarding the hotspots, i need more then 2 hotspots of an image at one time, and these hotspots should not overlap on each other.

i can get more then one hotspots, but these hotspot overlap each other, i need the code that the new hotspot will not overlap the previous one.

can you please help me in getting more the 2 hotspots of an image without overlapping them.
I will be very thankful to you

best regards
Tahir

42. STEPHEN CARL MURPHY (Nov, 02 2009 at 10:08 PM)


CONTACT*************************************************

43. Tord Nordell (Nov, 03 2009 at 01:24 PM)


You have a brilliant mind, take good care of it.

44. steve (Jan, 25 2010 at 09:17 PM)


hey there,
great script, thanks for contributing.
one question: I set a selection on startup and the user can change position and size. but it should always stay a square, no matter what the user does. is there an option for that?
thanks,
regards!

45. Travis Crane (Feb, 04 2010 at 05:44 PM)


Search Engine Optimization

We would like to get your website on first page of Google.

All of our processes use the most ethical ""white hat"" Search Engine Optimization techniques that will not get your website banned or penalized.
Please reply and I would be happy to send you a proposal.

46. Cecelia Maloney (Mar, 16 2010 at 01:45 AM)


SEO

Do you wish you could increase your online leads?

Getting a GUARANTEED 1ST PAGE GOOGLE RANKING is easier and more cost-effective than you might think.
We have helped a lot of businesses thrive in this market and we can help you! Simply hit reply and I’ll share with you the cost and the benefits See you at the top!

47. Coupon code (Mar, 29 2010 at 03:11 AM)


Great code! Please go on like this.

48. Jimmy Palacios (Apr, 06 2010 at 08:36 AM)


We would like to get your website on first page of Google.

All of our processes use the most ethical ""white hat"" Search Engine Optimization techniques that will not get your website banned or penalized.
Please reply and I would be happy to send you a proposal.

49. Martin Babcock (Apr, 13 2010 at 02:00 PM)


We are interested to increase traffic to your website, please get back to us in order to discuss the possibility in further detail.

50. BeatDaixx (May, 01 2010 at 06:59 AM)


nice tool ...tha nks

51. Sascha Beele (May, 11 2010 at 03:12 PM)


Thank you for article, i was looking for this article for a few days.

52. Ron Cheny (May, 24 2010 at 09:21 PM)


Idea for your website

We are Internet Marketing experts who can help you answer these questions, drive mass traffic to your site, and dramatically increase sales.


 

Leave your comment

  • Security code
  • Comments:*
    up
  • Loading