Git Product home page Git Product logo

Comments (8)

andrusieczko avatar andrusieczko commented on July 20, 2024

Hey, I'll take a look at that (possibly this week, maybe today?). Thanks!

EDIT:
Hey, I've quickly added the functionality, you can test it using this file:
https://github.com/andrusieczko/clip-path-polygon/blob/2-percentage-in-clippath/build/clip-path-polygon.min.js

It's on 2-percentage-in-clippath branch.

I'll add the tests and update the documentation later, then merge to master and bump the version . Until then, the minified file should work fine.

You can see the usage here:
https://github.com/andrusieczko/clip-path-polygon/blob/2-percentage-in-clippath/example.html

Numbers have to be between 0 and 100, the option is called isPercentage.

Thanks!

from clip-path-polygon.

zapletalovamartina avatar zapletalovamartina commented on July 20, 2024

Oh, yes!
IT works, good job.

I saved your script to my ftp.
I use it with https://github.com/srobbin/jquery-backstretch - no conflict and very good combination!

Edit:
How to define two polygon, please?
I need 2 types .Arrow for head, and double arrow for portfolio and foot.

$(function() {
var points = [[50, 0], [100, 0], [100, 85], [50, 99], [0, 86],[0, 0]];
$('#head').clipPath(points, {isPercentage: true});
});
$(function() {
var body = [[50, 7], [100, 0], [100, 93], [50, 100], [0, 93],[0, 0]];
$('#portfolio').clipPath(body, {isPercentage: true});
});
$(function() {
var body2= [[50, 7], [100, 0], [100, 93], [50, 100], [0, 93],[0, 0]];
$('#foot').clipPath(body2, {isPercentage: true});
});

Nice day!
Martina

from clip-path-polygon.

andrusieczko avatar andrusieczko commented on July 20, 2024

Hey, I'm glad it worked.

Unfortunately, I think I didn't fully understand your question though...

Don't you want to have it like that?

$(function() {
  var points = [[50, 0], [100, 0], [100, 85], [50, 99], [0, 86],[0, 0]];
  var body = [[50, 7], [100, 0], [100, 93], [50, 100], [0, 93],[0, 0]];
  var options = {isPercentage: true};
  $('#head').clipPath(points, options);
  $('#portfolio').clipPath(body, options);
  $('#foot').clipPath(body, options);
});

from clip-path-polygon.

zapletalovamartina avatar zapletalovamartina commented on July 20, 2024

Yes, something like this, but first #head may be some other polygon than
portfolio and foot.

Please have a look on this:

My error screenshot: http://snag.gy/5VHVV.jpg

I code this .psd:
http://gdj.gdj.netdna-cdn.com/wp-content/uploads/2014/04/arrow_psd_templates.jpg

Understand you, what I want?
Thanks for reply! :-)

2015-04-01 15:11 GMT+02:00 Karol Andrusieczko [email protected]:

Hey, I'm glad it worked.

Unfortunately, I think I didn't fully understand your question though...

Don't you want to have it like that?

$(function() {
var points = [[50, 0], [100, 0], [100, 85], [50, 99], [0, 86],[0, 0]];
var body = [[50, 7], [100, 0], [100, 93], [50, 100], [0, 93],[0, 0]];
var options = {isPercentage: true};
$('#head').clipPath(points, options);
$('#portfolio').clipPath(body, options);
$('#foot').clipPath(body, options);
});


Reply to this email directly or view it on GitHub
#2 (comment)
.

from clip-path-polygon.

andrusieczko avatar andrusieczko commented on July 20, 2024

I think you might want to use the option svgDefId to have different definitions of clippath. Is that what you're looking for?

$head.clipPath({svgDefId: 'headClippathDef'});
$foot.clipPath({svgDefId: 'footClippathDev'});

from clip-path-polygon.

zapletalovamartina avatar zapletalovamartina commented on July 20, 2024

Yes, I think, that is!
But - how, please? :-(

2015-04-01 17:31 GMT+02:00 Karol Andrusieczko [email protected]:

I think you might want to use the option svgDefId to have different
definitions of clippath. Is that what you're looking for?


Reply to this email directly or view it on GitHub
#2 (comment)
.

from clip-path-polygon.

andrusieczko avatar andrusieczko commented on July 20, 2024

Hey, please find the documentation updated here:
https://github.com/andrusieczko/clip-path-polygon

and the example:
https://raw.githubusercontent.com/andrusieczko/clip-path-polygon/master/resources/example.html

(just download the file and open in the browser).

I hope it'll help!

from clip-path-polygon.

zapletalovamartina avatar zapletalovamartina commented on July 20, 2024

Yes, It´s perfect for me :).
Looking like a psd template :).

Thanks for all, and good luck.

M.

from clip-path-polygon.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.