Code Monkey home page Code Monkey logo

Comments (5)

andersevenrud avatar andersevenrud commented on June 10, 2024

First off, you should never modify the dist folder contents. Modify the sources and rebuild instead.

https://manual.os-js.org/tutorial/window/ will show you how to remove resizing by setting an option.

from os.js.

rocheston avatar rocheston commented on June 10, 2024

Thank you.

from os.js.

rocheston avatar rocheston commented on June 10, 2024

It is not working for iFrame applications. Resizable option is still enabled and I can resize the windows. Here is the code. Please tell me what I am doing wrong? I want to lock the chess game from being resized.

File location: src/Package/AboutMaya/index.js

I rebuit everything. Still no go.


import osjs from 'osjs';
import {name as applicationName} from './metadata.json';

// Our launcher
const register = (core, args, options, metadata) => {
  // Create a new Application instance
  const proc = core.make('osjs/application', {args, options, metadata});

  // Create  a new Window instance
  proc
    .createWindow({
      id: 'AboutMayaWindow', resizable: false,
      title: metadata.title.en_EN,
      icon: proc.resource(proc.metadata.icon),
      dimension: {width: 400, height: 400},
      position: {left: 700, top: 200}
    })
    .on('destroy', () => proc.destroy())
    .render($content => {
      const iframe = document.createElement('iframe');
      iframe.style.width = '100%';
      iframe.style.height = '100%';
      iframe.src = proc.resource('/data/index.html');
      iframe.setAttribute('border', '0');
      $content.appendChild(iframe);
    });

grab0

from os.js.

andersevenrud avatar andersevenrud commented on June 10, 2024

That should be:

.createWindow({
  attributes: {
    resizable: false,
  }
})

from os.js.

rocheston avatar rocheston commented on June 10, 2024

That totally worked. Your support is fantastic. Thank you. 🙏

from os.js.

Related Issues (20)

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.