web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
811 B

  1. // Generated by CoffeeScript 1.9.3
  2. var _common, inlineStyleApplier, self, tools;
  3. tools = require('../../tools');
  4. _common = require('./_common');
  5. module.exports = inlineStyleApplier = self = {
  6. applyTo: function(el, style) {
  7. var ret;
  8. ret = _common.getStyleTagsFor(style);
  9. if (style.marginLeft != null) {
  10. ret.before = (tools.repeatString("&sp;", parseInt(style.marginLeft))) + ret.before;
  11. }
  12. if (style.marginRight != null) {
  13. ret.after += tools.repeatString("&sp;", parseInt(style.marginRight));
  14. }
  15. if (style.paddingLeft != null) {
  16. ret.before += tools.repeatString("&sp;", parseInt(style.paddingLeft));
  17. }
  18. if (style.paddingRight != null) {
  19. ret.after = (tools.repeatString("&sp;", parseInt(style.paddingRight))) + ret.after;
  20. }
  21. return ret;
  22. }
  23. };